diff options
Diffstat (limited to 'srcs/phpmyadmin/templates/dropdown.twig')
| -rw-r--r-- | srcs/phpmyadmin/templates/dropdown.twig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/templates/dropdown.twig b/srcs/phpmyadmin/templates/dropdown.twig new file mode 100644 index 0000000..6258ca7 --- /dev/null +++ b/srcs/phpmyadmin/templates/dropdown.twig @@ -0,0 +1,11 @@ +<select name="{{ select_name }}"{% if id is not empty %} id="{{ id }}"{% endif -%} + {%- if class is not empty %} class="{{ class }}"{% endif %}> +{% if placeholder is not empty %} + <option value="" disabled="disabled" + {%- if not selected %} selected="selected"{% endif %}>{{ placeholder }}</option> +{% endif %} +{% for option in result_options %} +<option value="{{ option['value'] }}" + {{- option['selected'] ? ' selected="selected"' }}>{{ option['label'] }}</option> +{% endfor %} +</select> |
