moodle/lib/form/templates/element-selectwithlink.mustache

25 lines
1.0 KiB
Plaintext

{{< core_form/element-template }}
{{$element}}
{{^element.frozen}}
<select class="custom-select {{#error}}is-invalid{{/error}}" name="{{element.name}}"
id="{{element.id}}"
{{#element.multiple}}multiple{{/element.multiple}}
{{#element.size}}size="{{element.size}}"{{/element.size}}
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}} {{{optionattributes}}}>{{{text}}}</option>
{{/element.options}}
</select>
{{/element.frozen}}
{{#element.frozen}}
{{#element.options}}
{{#selected}}{{{text}}}{{/selected}}
{{/element.options}}
{{/element.frozen}}
<a class="mx-3" href="{{{element.link}}}">{{element.linklabel}}</a>
{{/element}}
{{/ core_form/element-template }}