MDL-56577 core_form: Let other option attrs to be set in select elements
[moodle.git] / theme / boost / templates / core_form / element-selectgroups-inline.mustache
1 {{< core_form/element-template-inline }}
2     {{$element}}
3     {{^element.frozen}}
4     <select class="form-control {{#error}}form-control-danger{{/error}}" name="{{element.name}}"
5         id="{{element.id}}"
6         {{#element.multiple}}multiple{{/element.multiple}}
7         {{#error}}
8             autofocus aria-describedby="id_error_{{element.name}}"
9         {{/error}}
10         {{{element.attributes}}} >
11         {{#element.optiongroups}}
12         {{#text}}
13         <optgroup label="{{text}}">
14         {{/text}}
15         {{#options}}
16         <option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}} {{{optionattributes}}}>{{{text}}}</option>
17         {{/options}}
18         {{#text}}
19         </optgroup>
20         {{/text}}
21         {{/element.optiongroups}}
22     </select>
23     {{/element.frozen}}
24     {{#element.frozen}}
25         {{#element.optiongroups}}
26         {{#options}}
27             {{#selected}}{{{text}}}{{/selected}}
28         {{/options}}
29         {{/element.optiongroups}}
30     {{/element.frozen}}
31     {{/element}}
32 {{/ core_form/element-template-inline }}