1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-22 08:13:14 +02:00

[ticket/17100] Use twig functions for form elements

PHPBB3-17100
This commit is contained in:
Marc Alexander
2023-04-09 13:12:39 +02:00
parent 69f5d5f40f
commit 60dacf0bfe
21 changed files with 313 additions and 116 deletions

View File

@@ -1,15 +1,14 @@
<dl>
{% from "macros/form_macros.twig" import select %}
<dt><label for="timezone">{{ lang('BOARD_TIMEZONE') | lang('COLON') }}</label></dt>
<dt><label for="timezone">{{ lang('BOARD_TIMEZONE') ~ lang('COLON') }}</label></dt>
{% if TIMEZONE_OPTIONS %}
<dd id="tz_select_date hidden">
{% set tz_date_data = TIMEZONE_OPTIONS|merge({ options: [{ value: "", label: lang('SELECT_CURRENT_TIME') }]|merge(TIMEZONE_OPTIONS.options) }) %}
{{ select(tz_date_data, 'autowidth tz_select', 'tz_date', 'tz_date', true) }}
{% set tz_date_data = TIMEZONE_OPTIONS | merge({options: [{ value: "", label: lang('SELECT_CURRENT_TIME')}] | merge(TIMEZONE_OPTIONS.options) }) %}
{{ FormsSelect(tz_date_data | merge({class: 'autowidth tz_select', id: 'tz_date', name: 'tz_date', group_only: true})) }}
</dd>
{% endif %}
<dd>
{% set tz_select_data = TIMEZONE_OPTIONS|merge({ options: [{ value: "", label: lang('SELECT_TIMEZONE') }]|merge(TIMEZONE_OPTIONS.options) }) %}
{{ select(tz_select_data, 'autowidth tz_select', 'timezone') }}
{% set tz_select_data = TIMEZONE_OPTIONS | merge({ options: [{ value: "", label: lang('SELECT_TIMEZONE') }] | merge(TIMEZONE_OPTIONS.options) }) %}
{{ FormsSelect(tz_select_data | merge({class: 'autowidth tz_select', id: 'timezone'})) }}
{% INCLUDEJS('timezone.js') %}
</dd>