MDL-55417 forms: Improve some of the new templates for form elements
Also - un-deprecate selectwithlink (Fred convinced me). Part of MDL-55071
This commit is contained in:
committed by
Dan Poltawski
parent
97a00c9b8e
commit
7e2cd5b84e
@@ -48,4 +48,3 @@
|
||||
<span>{{noSelectionString}}</span>
|
||||
{{/items}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
require(['core/yui'], function(Y) {
|
||||
Y.use('moodle-form-passwordunmask', function() {
|
||||
M.form.passwordunmask({ formid: {{#quote}}{{element.id}}{{/quote}},
|
||||
checkboxlabel: '{{#str}}unmaskpassword, form{{/str}}',
|
||||
checkboxlabel: {{#quote}}{{#str}}unmaskpassword, form{{/str}}{{/quote}},
|
||||
checkboxname: {{#quote}}{{element.name}}{{/quote}} });
|
||||
});
|
||||
});
|
||||
{{/js}}
|
||||
{{/js}}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{{< core_form/element-template }}
|
||||
{{$element}}
|
||||
<select class="custom-select {{#error}}form-control-danger{{/error}}" name="{{element.name}}"
|
||||
id="{{element.id}}"
|
||||
{{#element.multiple}}multiple{{/element.multiple}}
|
||||
{{#element.frozen}}readonly disabled{{/element.frozen}}
|
||||
{{#error}}
|
||||
autofocus aria-describedby="id_error_{{element.name}}"
|
||||
{{/error}}
|
||||
{{element.attributes}} >
|
||||
{{#element.options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
|
||||
{{/element.options}}
|
||||
</select>
|
||||
<a class="m-x-1" href="{{{element.link}}}">{{element.linklabel}}</a>
|
||||
{{/element}}
|
||||
{{/ core_form/element-template }}
|
||||
Reference in New Issue
Block a user