1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/17151] Make settings forms use macros

PHPBB3-17151
This commit is contained in:
rxu
2023-09-19 00:32:24 +07:00
parent c6fd14352e
commit 72770937f2
7 changed files with 187 additions and 77 deletions

View File

@@ -21,11 +21,18 @@
label="{{ element.label }}">
{% endapply %}
{% for option in element.options %}
<option value="{{ option.value }}"{% if option.selected %} selected="selected"{% endif %}{% if option.disabled %} disabled="disabled" class="disabled-option"{% endif %}>{{ option.label }}</option>
<option
value="{{ option.value }}"
{% if option.selected %}selected="selected"{% endif %}
{% if option.disabled %} disabled="disabled" class="disabled-option"{% endif %}>{{ option.label }}</option>
{% endfor %}
</optgroup>
{% else %}
<option value="{{ element.value }}"{% if element.selected %} selected="selected"{% endif %}{% if element.disabled %} disabled="disabled" class="disabled-option"{% endif %}>{{ element.label }}</option>
<option
value="{{ element.value }}"
{% if element.selected %} selected="selected"{% endif %}
{% if element.disabled %} disabled="disabled" class="disabled-option"{% endif %}
{% if element.data %}{% for key, value in element.data %} data-{{ key }}="{{ value }}"{% endfor %}{% endif %}>{{ element.label }}</option>
{% endif %}
{% endfor %}
</select>

View File

@@ -7,4 +7,5 @@
{% endfor %}
name="{{ NAME }}"
rows="{{ ROWS }}"
cols="{{ COLS }}">{% endapply %}{{ CONTENT }}</textarea>
cols="{{ COLS }}"
{% if PLACEHOLDER %}placeholder="{{ PLACEHOLDER }}"{% endif %}>{% endapply %}{{ CONTENT }}</textarea>