mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #6533 from rxu/ticket/17151-2
[ticket/17151] Make settings forms use macros
This commit is contained in:
@@ -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 %}
|
||||
@@ -14,5 +14,6 @@
|
||||
{% if STEP %}step="{{ STEP }}" {% endif %}
|
||||
{% if TYPE == 'password' %}autocomplete="off" {% endif %}
|
||||
{% if CHECKED %}checked="checked" {% endif %}
|
||||
{% if DISABLED %}disabled="disabled" {% endif %}
|
||||
value="{{ VALUE }}">
|
||||
{% endapply %}
|
||||
|
@@ -1,2 +1,3 @@
|
||||
<label>{{ FormsInput(FIRST_BUTTON) ~ FIRST_BUTTON_LABEL }}</label>
|
||||
<label>{{ FormsInput(SECOND_BUTTON) ~ SECOND_BUTTON_LABEL }}</label>
|
||||
{% for button in BUTTONS %}
|
||||
<label>{{ FormsInput(button) ~ ' ' ~ button.label }}</label>
|
||||
{% endfor %}
|
||||
|
@@ -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 %}
|
||||
@@ -6,26 +6,30 @@
|
||||
data-{{ attribute|e }}="{{ attribute_value|e('html_attr') }}"
|
||||
{% endfor %}
|
||||
name="{{ NAME }}"
|
||||
{% if TOGGLEABLE %}data-togglable-settings="true" {% endif %}
|
||||
|
||||
{% if MULTIPLE %}multiple="multiple" {% endif %}
|
||||
{% if SIZE %}size="{{ SIZE }}" {% endif %}>
|
||||
{% endapply %}
|
||||
{% if TOGGLEABLE %}data-togglable-settings="true"{% endif %}
|
||||
{% if MULTIPLE %}multiple="multiple"{% endif %}
|
||||
{% if SIZE %}size="{{ SIZE }}"{% endif %}>
|
||||
{% 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 }}"{% 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"{% endif %}{% if option.class %} class="{{ option.class }}"{% 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"{% endif %}{% if element.class %} class="{{ element.class }}"{% endif %}
|
||||
{% if element.data %}{% for key, value in element.data %} data-{{ key }}="{{ value }}"{% endfor %}{% endif %}>{{ element.label }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endapply %}
|
||||
|
@@ -1,10 +1,11 @@
|
||||
{% apply replace({"\n": ' ', '\t': ''}) %}
|
||||
{% apply replace({"\n": ' ', '\t': ''}) %}
|
||||
<textarea
|
||||
{% if CLASS %}class="{{ CLASS }}" {% endif %}
|
||||
id="{{ ID }}"
|
||||
{% if ID %}id="{{ ID }}" {% endif %}
|
||||
{% for attribute, attribute_value in DATA %}
|
||||
data-{{ attribute|e }}="{{ attribute_value|e('html_attr') }}"
|
||||
{% endfor %}
|
||||
name="{{ NAME }}"
|
||||
rows="{{ ROWS }}"
|
||||
cols="{{ COLS }}">{% endapply %}{{ CONTENT }}</textarea>
|
||||
cols="{{ COLS }}"
|
||||
{% if PLACEHOLDER %}placeholder="{{ PLACEHOLDER }}"{% endif %}>{% endapply %}{{ CONTENT }}</textarea>
|
||||
|
@@ -61,7 +61,9 @@
|
||||
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
|
||||
<dl>
|
||||
<dt><label for="user_style">{L_BOARD_STYLE}{L_COLON}</label></dt>
|
||||
<dd><select name="user_style" id="user_style">{S_STYLE_OPTIONS}</select></dd>
|
||||
<dd>
|
||||
{{ FormsSelect(S_STYLE_OPTIONS) }}
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE timezone_option.html -->
|
||||
|
Reference in New Issue
Block a user