[ticket/17151] Adjust template output formatting

PHPBB3-17151
This commit is contained in:
rxu 2023-09-23 10:21:07 +07:00
parent 130366edfa
commit 830c1f3dc3
No known key found for this signature in database
GPG key ID: 955F0567380E586A
2 changed files with 6 additions and 9 deletions

View file

@ -1,4 +1,4 @@
{% apply replace({"\n": ' ', "\t": ''}) %}
{% apply replace({"\n\t": ' ', "\t": '', "\n": ''}) %}
<input
{% if CLASS %}class="{{ CLASS }}" {% endif %}
{% if ID %}id="{{ ID }}" {% endif %}

View file

@ -1,4 +1,4 @@
{% apply replace({"\n": ' ', "\t": ''}) %}
{% apply replace({"\n\t": ' ', "\t": '', "\n": ''}) %}
<select
{% if CLASS %}class="{{ CLASS }}" {% endif %}
{% if ID %}id="{{ ID }}" {% endif %}
@ -7,19 +7,15 @@
{% endfor %}
name="{{ NAME }}"
{% if TOGGLEABLE %}data-togglable-settings="true"{% endif %}
{% if MULTIPLE %}multiple="multiple"{% endif %}
{% if SIZE %}size="{{ SIZE }}"{% endif %}>
{% endapply %}
{% for element in OPTIONS %}
{% if not GROUP_ONLY and element.options %}
{% apply replace({"\n": ' ', '\t': ''}) %}
<optgroup
{% for key, value in element.data %}
data-{{ key }}="{{ value }}"
{% endfor %}
label="{{ element.label }}">
{% endapply %}
{% for option in element.options %}
<option
value="{{ option.value }}"
@ -36,3 +32,4 @@
{% endif %}
{% endfor %}
</select>
{% endapply %}