From 8fb8bfaf354e85691cef3ef5876e12da983491ad Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 24 Jan 2023 14:22:17 +0800 Subject: [PATCH] MDL-77007 auth: Remove auth-yui-passwordunmask This was used as part of the auth_config.php configuration system for the auth subsystem, which was deprecated in Moodle 3.3. It has never had any other uses in core. Whilst it would be ideal to deprecate it by replacing with an alternative, it would be impossible to test. --- auth/upgrade.txt | 1 + auth/yui/passwordunmask/passwordunmask.js | 42 ----------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 auth/yui/passwordunmask/passwordunmask.js diff --git a/auth/upgrade.txt b/auth/upgrade.txt index 6ba39846be8..808be899613 100644 --- a/auth/upgrade.txt +++ b/auth/upgrade.txt @@ -3,6 +3,7 @@ information provided here is intended especially for developers. === 4.2 === * Support for configuration with the deprecated auth_config.php file has been removed. +* The moodle-auth-passwordunmask YUI module has been removed. Any uses should be replaced with core_form/passwordunmask. === 3.9 === diff --git a/auth/yui/passwordunmask/passwordunmask.js b/auth/yui/passwordunmask/passwordunmask.js deleted file mode 100644 index 6e85f9eee38..00000000000 --- a/auth/yui/passwordunmask/passwordunmask.js +++ /dev/null @@ -1,42 +0,0 @@ -YUI.add('moodle-auth-passwordunmask', function(Y) { - var PASSWORDUNMASK = function() { - PASSWORDUNMASK.superclass.constructor.apply(this, arguments); - } - - Y.extend(PASSWORDUNMASK, Y.Base, { - // Initialize checkboxes. - initializer : function(params) { - this.add_checkboxes(); - }, - // Create checkboxes for all unmasking passwords. - 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'); - - // Retain unmask div from previous implementation. - var unmaskdiv = Y.Node.create('
'); - - // Add checkbox for unmasking to unmaskdiv. - var unmaskchb = Y.Node.create(''); - unmaskdiv.appendChild(unmaskchb); - //Attach event using static javascript function for unmasking password. - unmaskchb.on('click', function() {unmaskPassword(elementid);}); - - // Add label for checkbox to unmaskdiv. - var unmasklabel = Y.Node.create(''); - unmaskdiv.appendChild(unmasklabel); - - // Insert unmask div in the same div as password input. - node.get('parentNode').insert(unmaskdiv, node.get('lastNode')); - }); - return; - } - }); - - M.auth = M.auth || {}; - M.auth.passwordunmask = function(params) { - return new PASSWORDUNMASK(params); - } -}, '@VERSION@', {requires:['base', 'node']});