mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
893ce4f7b2
This works the same as the customclassoverride on the submit element, in that only the 'btn' class is hard coded in the template. Passing $options['customclassoverride'] to the constructor allows calling code to specify other classes to be added beside 'btn'. E.g. 'btn-primary'. If no options array is passed, 'btn-secondary' is used (the existing class used for button elements).
21 lines
746 B
Plaintext
21 lines
746 B
Plaintext
{{< core_form/element-template-inline }}
|
|
{{$element}}
|
|
{{^element.frozen}}
|
|
<button
|
|
class="btn
|
|
{{^element.customclassoverride}}btn-secondary{{/element.customclassoverride}}
|
|
{{#element.customclassoverride}}{{.}}{{/element.customclassoverride}}"
|
|
name="{{element.name}}"
|
|
id="{{element.id}}"
|
|
type="button"
|
|
{{#error}}
|
|
autofocus aria-describedby="{{element.iderror}}"
|
|
{{/error}}
|
|
{{{element.attributes}}}
|
|
>
|
|
{{{element.value}}}
|
|
</button>
|
|
{{/element.frozen}}
|
|
{{/element}}
|
|
{{/ core_form/element-template-inline }}
|