avoid double blanks while rendering form attributes
This commit is contained in:
parent
005b4b74d5
commit
a9c11c9b20
@ -79,7 +79,7 @@
|
|||||||
{{- block('choice_widget_options') -}}
|
{{- block('choice_widget_options') -}}
|
||||||
</optgroup>
|
</optgroup>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<option value="{{ choice.value }}"{% if choice.attr %} {% with { attr: choice.attr } %}{{ block('attributes') }}{% endwith %}{% endif %}{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}</option>
|
<option value="{{ choice.value }}"{% if choice.attr %}{% with { attr: choice.attr } %}{{ block('attributes') }}{% endwith %}{% endif %}{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}</option>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- endblock choice_widget_options -%}
|
{%- endblock choice_widget_options -%}
|
||||||
@ -259,7 +259,7 @@
|
|||||||
{% set label = name|humanize %}
|
{% set label = name|humanize %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<label{% if label_attr %} {% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}</label>
|
<label{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}</label>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endblock form_label -%}
|
{%- endblock form_label -%}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user