3c0b252f6f2410b089a57099be83cd98855feb04
[moodle.git] / theme / noname / templates / core_form / element-password.mustache
1 {{< core_form/element-template }}
2     {{$element}}
3         <input type="password"
4                 {{#element.frozen}}readonly{{/element.frozen}}
5                 class="form-control {{#error}}form-control-danger{{/error}}"
6                 name="{{element.name}}"
7                 id="{{element.id}}"
8                 value="{{element.value}}"
9                 size="{{element.size}}"
10                 {{#error}}
11                     autofocus aria-describedby="id_error_{{element.name}}"
12                 {{/error}} {{{attributes}}}>
13     {{/element}}
14 {{/ core_form/element-template }}
15 {{#js}}
16 require(['core/yui'], function(Y) {
17     Y.use('moodle-form-passwordunmask', function() {
18         M.form.passwordunmask({ formid: {{#quote}}{{element.id}}{{/quote}},
19                                 checkboxlabel: '{{#str}}unmaskpassword, form{{/str}}',
20                                 checkboxname: {{#quote}}{{element.name}}{{/quote}} });
21     });
22 });
23 {{/js}}