2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template core_admin/setting_encryptedpassword
20 Admin encrypted password template.
22 Context variables required for this template:
23 * name - form element name
24 * set - whether it is set or empty
27 Example context (json):
34 <div class="core_admin_encryptedpassword" data-encryptedpasswordid="{{ id }}"
35 {{#novalue}}data-novalue="y"{{/novalue}}>
37 <span>{{# str }} encryptedpassword_set, admin {{/ str }}</span>
40 <a href="#" title="{{# str }} encryptedpassword_edit, admin {{/ str }}">
41 <span>{{# str }} novalueclicktoset, form {{/ str }}</span>
42 {{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
45 <input style="display: none" type="password" name="{{name}}" disabled>
47 Using buttons instead of links here allows them to be connected to the label, so the button
48 works if you click the label.
51 <button type="button" id="{{id}}" title="{{# str }} encryptedpassword_edit, admin {{/ str }}" class="btn btn-link" data-editbutton>
52 {{# pix }} t/passwordunmask-edit, core, {{/ pix }}
55 <button type="button" style="display: none" title="{{# str }} cancel {{/ str }}" class="btn btn-link" data-cancelbutton>
56 <i class="icon fa fa-times"></i>
61 require(['core_form/encryptedpassword'], function(encryptedpassword) {
62 new encryptedpassword.EncryptedPassword("{{ id }}");