mirror of
https://github.com/jbcr/core.git
synced 2026-04-25 01:28:18 +02:00
32 lines
1.0 KiB
Twig
32 lines
1.0 KiB
Twig
{% extends '@bolt/_partials/fields/_base.html.twig' %}
|
|
|
|
{# On top of the attributes that get set/defined in `_base.html.twig`,
|
|
The Select fields has three additional attributes:
|
|
|
|
- options: The actual options that are available in the select
|
|
- multiple: A boolean to set whether or not we allow multiple selections
|
|
#}
|
|
|
|
{% if options is not defined %}
|
|
{% set options = select_options(field) %}
|
|
{% endif %}
|
|
|
|
{% if multiple is not defined %}
|
|
{% set multiple = field.definition.get('multiple')|default ? 'true' : 'false' %}
|
|
{% endif %}
|
|
|
|
{% block field %}
|
|
<editor-select
|
|
:classname="{{ "wide-options"|json_encode }}"
|
|
:value="{{ value|json_encode }}"
|
|
:name='{{ name|json_encode }}'
|
|
:id='{{ id|json_encode }}'
|
|
:options="{{ options|json_encode }}"
|
|
:form='{{ form|json_encode }}'
|
|
:multiple="{{ multiple }}"
|
|
:readonly="{{ readonly|json_encode }}"
|
|
:errormessage='{{ errormessage|json_encode }}'
|
|
:allowempty="{{ required ? 'false' : 'true' }}"
|
|
></editor-select>
|
|
{% endblock %}
|