mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-42208 fix JS get_string usage and remove unnecessary params from auth password unmask init
This commit is contained in:
parent
6e0ace3885
commit
a668a7e420
@ -78,9 +78,8 @@ echo '<p style="text-align: center"><input type="submit" value="' . get_string("
|
||||
echo "</div>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
$unmask = get_string('unmaskpassword', 'core_form');
|
||||
$attributes = array('formid' => 'authmenu', 'checkboxlabel' => $unmask);
|
||||
$PAGE->requires->yui_module('moodle-auth-passwordunmask', 'M.auth.passwordunmask', array($attributes));
|
||||
$PAGE->requires->string_for_js('unmaskpassword', 'core_form');
|
||||
$PAGE->requires->yui_module('moodle-auth-passwordunmask', 'M.auth.passwordunmask');
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
|
5
auth/yui/passwordunmask/passwordunmask.js
vendored
5
auth/yui/passwordunmask/passwordunmask.js
vendored
@ -6,11 +6,12 @@ YUI.add('moodle-auth-passwordunmask', function(Y) {
|
||||
Y.extend(PASSWORDUNMASK, Y.Base, {
|
||||
// Initialize checkboxes.
|
||||
initializer : function(params) {
|
||||
this.add_checkboxes(params.checkboxlabel);
|
||||
this.add_checkboxes();
|
||||
},
|
||||
// Create checkboxes for all unmasking passwords.
|
||||
add_checkboxes : function(checkboxlabel) {
|
||||
add_checkboxes : function() {
|
||||
Y.all('#authmenu input[type=password]').each(function(node) {
|
||||
var checkboxlabel = M.util.get_string('unmaskpassword', 'core_form');
|
||||
var elementid = node.get('id');
|
||||
var elementname = node.get('name');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user