[ticket/17414] Support adding onchange to select

PHPBB-17414
This commit is contained in:
Marc Alexander 2024-10-05 20:56:35 +02:00
parent edce13c777
commit c27c1fa7a3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 2 additions and 0 deletions

View file

@ -183,6 +183,7 @@ class forms extends AbstractExtension
'GROUP_ONLY' => (bool) ($form_data['group_only'] ?? false),
'SIZE' => (int) ($form_data['size'] ?? 0),
'MULTIPLE' => (bool) ($form_data['multiple'] ?? false),
'ONCHANGE' => (string) ($form_data['onchange'] ?? ''),
]);
}
catch (\Twig\Error\Error $e)

View file

@ -8,6 +8,7 @@
name="{{ NAME }}"
{% if TOGGLEABLE %}data-togglable-settings="true"{% endif %}
{% if MULTIPLE %}multiple="multiple"{% endif %}
{% if ONCHANGE %}onchange="{{ ONCHANGE }}"{% endif %}
{% if SIZE %}size="{{ SIZE }}"{% endif %}>
{% for element in OPTIONS %}
{% if not GROUP_ONLY and element.options %}