-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathform_data.html.twig
76 lines (73 loc) · 3.2 KB
/
form_data.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% macro render(field) %}
{% set value = field.value %}
{% if value is iterable %}
{% set value = value|join(', ') %}
{% endif %}
{% if value is not empty %}
<tr>
<td width="50%" valign="top" align="left"><strong>{{ field.email_label|default(field.label)|raw }}:</strong></td>
<td width="50%" valign="top" align="left">{{ value }}</td>
</tr>
{% endif %}
{% endmacro %}
{% import _self as formFieldRenderer %}
<table>
<thead></thead>
<tbody>
{% for field in fields|default([]) %}
{% if field.field_type == 'simple' %}
{{ formFieldRenderer.render(field) }}
{% elseif field.field_type == 'container' %}
{% if field.fields is defined and field.fields is iterable and field.fields|length > 0 %}
{% if field.label != false %}
<tr>
<td width="100%" valign="top" colspan="2" align="left"><strong>{{ field.label|trans }}:</strong></td>
</tr>
{% endif %}
<tr>
<td width="100%" valign="top" align="left" colspan="2">
<table width="100%">
{% for field_container in field.fields %}
{% if field_container is iterable %}
{% if field.block_label is defined and field.block_label != false %}
<tr>
<td width="100%" valign="top" colspan="2" align="left"><strong>{{ field.block_label|trans }}:</strong></td>
</tr>
{% endif %}
{% for sub_field in field_container %}
{{ formFieldRenderer.render(sub_field) }}
{% endfor %}
{% if loop.last == false %}
<tr>
<td width="100%" valign="top" colspan="2">
<hr>
</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
</table>
</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
{#
[DOUBLE-OPT-IN]
If you want to show double opt in session values, uncomment this section
available fields:
- double_opt_in_session.email
- double_opt_in_session.token
- double_opt_in_session.creation_date
- double_opt_in_session.additional_data
#}
{#
{% if double_opt_in_session is defined and double_opt_in_session is not null %}
<tr>
<td width="50%" valign="top" align="left"><strong>Double-Opt-In-Email:</strong></td>
<td width="50%" valign="top" align="left">{{ double_opt_in_session.email }}</td>
</tr>
{% endif %}
#}
</tbody>
</table>