|
47 | 47 | {% endspaceless %} |
48 | 48 | {% endblock field_rest %} |
49 | 49 |
|
50 | | -{% block attributes %} |
| 50 | +{% block widget_attributes %} |
51 | 51 | {% spaceless %} |
52 | 52 | id="{{ id }}" name="{{ full_name }}"{% if read_only %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %} |
53 | 53 | {% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %} |
54 | 54 | {% endspaceless %} |
55 | | -{% endblock attributes %} |
| 55 | +{% endblock widget_attributes %} |
56 | 56 |
|
57 | | -{% block container_attributes %} |
| 57 | +{% block widget_container_attributes %} |
58 | 58 | {% spaceless %} |
59 | 59 | id="{{ id }}" |
60 | 60 | {% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %} |
61 | 61 | {% endspaceless %} |
62 | | -{% endblock container_attributes %} |
| 62 | +{% endblock widget_container_attributes %} |
63 | 63 |
|
64 | 64 | {% block form_widget %} |
65 | 65 | {% spaceless %} |
66 | | - <div {{ block('container_attributes') }}> |
| 66 | + <div {{ block('widget_container_attributes') }}> |
67 | 67 | {{ block('field_rows') }} |
68 | 68 | {{ form_rest(form) }} |
69 | 69 | </div> |
|
73 | 73 | {% block field_widget %} |
74 | 74 | {% spaceless %} |
75 | 75 | {% set type = type|default('text') %} |
76 | | - <input type="{{ type }}" {{ block('attributes') }} value="{{ value }}" /> |
| 76 | + <input type="{{ type }}" {{ block('widget_attributes') }} value="{{ value }}" /> |
77 | 77 | {% endspaceless %} |
78 | 78 | {% endblock field_widget %} |
79 | 79 |
|
|
102 | 102 |
|
103 | 103 | {% block textarea_widget %} |
104 | 104 | {% spaceless %} |
105 | | - <textarea {{ block('attributes') }}>{{ value }}</textarea> |
| 105 | + <textarea {{ block('widget_attributes') }}>{{ value }}</textarea> |
106 | 106 | {% endspaceless %} |
107 | 107 | {% endblock textarea_widget %} |
108 | 108 |
|
109 | | -{% block options %} |
| 109 | +{% block widget_choice_options %} |
110 | 110 | {% spaceless %} |
111 | 111 | {% for choice, label in options %} |
112 | 112 | {% if _form_is_choice_group(label) %} |
|
120 | 120 | {% endif %} |
121 | 121 | {% endfor %} |
122 | 122 | {% endspaceless %} |
123 | | -{% endblock options %} |
| 123 | +{% endblock widget_choice_options %} |
124 | 124 |
|
125 | 125 | {% block choice_widget %} |
126 | 126 | {% spaceless %} |
127 | 127 | {% if expanded %} |
128 | | - <div {{ block('container_attributes') }}> |
| 128 | + <div {{ block('widget_container_attributes') }}> |
129 | 129 | {% for choice, child in form %} |
130 | 130 | {{ form_widget(child) }} |
131 | 131 | {{ form_label(child) }} |
132 | 132 | {% endfor %} |
133 | 133 | </div> |
134 | 134 | {% else %} |
135 | | - <select {{ block('attributes') }}{% if multiple %} multiple="multiple"{% endif %}> |
| 135 | + <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}> |
136 | 136 | {% if empty_value is not none %} |
137 | 137 | <option value="">{{ empty_value|trans }}</option> |
138 | 138 | {% endif %} |
139 | 139 | {% if preferred_choices|length > 0 %} |
140 | 140 | {% set options = preferred_choices %} |
141 | | - {{ block('options') }} |
| 141 | + {{ block('widget_choice_options') }} |
142 | 142 | <option disabled="disabled">{{ separator }}</option> |
143 | 143 | {% endif %} |
144 | 144 | {% set options = choices %} |
145 | | - {{ block('options') }} |
| 145 | + {{ block('widget_choice_options') }} |
146 | 146 | </select> |
147 | 147 | {% endif %} |
148 | 148 | {% endspaceless %} |
149 | 149 | {% endblock choice_widget %} |
150 | 150 |
|
151 | 151 | {% block checkbox_widget %} |
152 | 152 | {% spaceless %} |
153 | | - <input type="checkbox" {{ block('attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> |
| 153 | + <input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> |
154 | 154 | {% endspaceless %} |
155 | 155 | {% endblock checkbox_widget %} |
156 | 156 |
|
157 | 157 | {% block radio_widget %} |
158 | 158 | {% spaceless %} |
159 | | - <input type="radio" {{ block('attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> |
| 159 | + <input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> |
160 | 160 | {% endspaceless %} |
161 | 161 | {% endblock radio_widget %} |
162 | 162 |
|
163 | 163 | {% block datetime_widget %} |
164 | 164 | {% spaceless %} |
165 | | - <div {{ block('container_attributes') }}> |
| 165 | + <div {{ block('widget_container_attributes') }}> |
166 | 166 | {{ form_errors(form.date) }} |
167 | 167 | {{ form_errors(form.time) }} |
168 | 168 | {{ form_widget(form.date) }} |
|
176 | 176 | {% if widget == 'single_text' %} |
177 | 177 | {{ block('text_widget') }} |
178 | 178 | {% else %} |
179 | | - <div {{ block('container_attributes') }}> |
| 179 | + <div {{ block('widget_container_attributes') }}> |
180 | 180 | {{ date_pattern|replace({ |
181 | 181 | '{{ year }}': form_widget(form.year), |
182 | 182 | '{{ month }}': form_widget(form.month), |
|
189 | 189 |
|
190 | 190 | {% block time_widget %} |
191 | 191 | {% spaceless %} |
192 | | - <div {{ block('container_attributes') }}> |
| 192 | + <div {{ block('widget_container_attributes') }}> |
193 | 193 | {{ form_widget(form.hour, { 'attr': { 'size': '1' } }) }}:{{ form_widget(form.minute, { 'attr': { 'size': '1' } }) }}{% if with_seconds %}:{{ form_widget(form.second, { 'attr': { 'size': '1' } }) }}{% endif %} |
194 | 194 | </div> |
195 | 195 | {% endspaceless %} |
|
0 commit comments