mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17100] Improve output of unwrapped macros
PHPBB3-17100
This commit is contained in:
parent
2dfe5ebe6d
commit
003b606781
1 changed files with 24 additions and 22 deletions
|
@ -1,4 +1,5 @@
|
|||
{% macro input(form_data) %}
|
||||
{% apply replace({"\n": ' ', '\t': ''}) %}
|
||||
<input
|
||||
{% if form_data.id %}id="{{ form_data.id }}"{% endif %}
|
||||
type="{{ form_data.type }}"
|
||||
|
@ -10,8 +11,8 @@
|
|||
{% if form_data.type == 'password' %}autocomplete="off"{% endif %}
|
||||
{% if form_data.checked %}checked="checked"{% endif %}
|
||||
{% if form_data.class %}class="{{ form_data.class }}"{% endif %}
|
||||
value="{{ form_data.value }}"
|
||||
>
|
||||
value="{{ form_data.value }}">
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro dimension(form_data) %}
|
||||
|
@ -19,14 +20,15 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro textarea(form_data) %}
|
||||
{% apply replace({"\n": ' ', '\t': ''}) %}
|
||||
<textarea
|
||||
id="{{ form_data.id }}"
|
||||
name="{{ form_data.name }}"
|
||||
rows="{{ form_data.rows }}"
|
||||
cols="{{ form_data.cols }}"
|
||||
>
|
||||
cols="{{ form_data.cols }}">
|
||||
{{ form_data.content }}
|
||||
</textarea>
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro radio_buttons(form_data) %}
|
||||
|
@ -35,7 +37,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro select(form_data) %}
|
||||
<select id="{{ form_data.id }}" name="{{ form_data.name }}">
|
||||
<select {% if form_data.id %}id="{{ form_data.id }}"{% endif %} name="{{ form_data.name }}">
|
||||
{% for option in form_data.options %}
|
||||
<option value="{{ option.value }}"{% if option.selected %} selected="selected"{% endif %}>{{ option.label }}</option>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Reference in a new issue