1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

[ticket/17100] Improve support for selects

PHPBB3-17100
This commit is contained in:
Marc Alexander
2022-04-18 21:07:50 +02:00
parent 003b606781
commit 8e05baca87
3 changed files with 61 additions and 11 deletions

View File

@@ -37,7 +37,7 @@
{% endmacro %}
{% macro select(form_data) %}
<select {% if form_data.id %}id="{{ form_data.id }}"{% endif %} name="{{ form_data.name }}">
<select {% if form_data.id %}id="{{ form_data.id }}"{% endif %} name="{{ form_data.name }}"{% if form_data.toggleable %} data-togglable-settings="true"{% endif %}>
{% for option in form_data.options %}
<option value="{{ option.value }}"{% if option.selected %} selected="selected"{% endif %}>{{ option.label }}</option>
{% endfor %}
@@ -51,6 +51,10 @@
{{ _self.dimension(form_data) }}
{% elseif form_data.tag == 'radio' %}
{{ _self.radio_buttons(form_data) }}
{% elseif form_data.tag == 'select' %}
{{ _self.select(form_data) }}
{% elseif form_data.tag == 'textarea' %}
{{ _self.textarea(form_data) }}
{% elseif form_data[0] %}
{% for element in form_data %}
{{ _self.build_template(element) }}