diff -u b/core/modules/user/user.es6.js b/core/modules/user/user.es6.js --- b/core/modules/user/user.es6.js +++ b/core/modules/user/user.es6.js @@ -47,10 +47,13 @@ // If the password strength indicator is enabled, add its markup. if (settings.password.showStrengthIndicator) { + const passwordMeter = `
${ + translate.strengthTitle + }
`; $confirmInput .parent() .after('
'); - $passwordInputParent.append(Drupal.theme('passwordMeter', translate)); + $passwordInputParent.append(passwordMeter); $passwordSuggestions = $passwordInputParentWrapper .find('div.password-suggestions') .hide(); diff -u b/core/modules/user/user.js b/core/modules/user/user.js --- b/core/modules/user/user.js +++ b/core/modules/user/user.js @@ -27,7 +27,7 @@ if (settings.password.showStrengthIndicator) { $confirmInput.parent().after('
'); - $passwordInputParent.append(Drupal.theme('passwordMeter', translate)); + $passwordInputParent.append(passwordMeter); $passwordSuggestions = $passwordInputParentWrapper.find('div.password-suggestions').hide(); } diff -u b/core/modules/user/user.theme.es6.js b/core/modules/user/user.theme.es6.js --- b/core/modules/user/user.theme.es6.js +++ b/core/modules/user/user.theme.es6.js @@ -3,7 +3,7 @@ * Theme elements for user password forms. */ -((Drupal) => { +(Drupal => { /** * Constucts a password confirm message element * @@ -16,14 +16,2 @@ } `; - - /** - * Constucts a password confirm message element - * - * @return {string} - * A string representing a DOM fragment. - */ - Drupal.theme.passwordMeter = translate => - `
${ - translate.strengthTitle - }
`; - })(Drupal); diff -u b/core/modules/user/user.theme.js b/core/modules/user/user.theme.js --- b/core/modules/user/user.theme.js +++ b/core/modules/user/user.theme.js @@ -11,6 +11,2 @@ }; - - Drupal.theme.passwordMeter = function (translate) { - return "
" + translate.strengthTitle + "
"; - }; })(Drupal); \ No newline at end of file diff -u b/core/themes/stable/js/user.theme.es6.js b/core/themes/stable/js/user.theme.es6.js --- b/core/themes/stable/js/user.theme.es6.js +++ b/core/themes/stable/js/user.theme.es6.js @@ -3,7 +3,7 @@ * Stable theme overrides for user password forms. */ -((Drupal) => { +(Drupal => { /** * Constucts a password confirm message element * @@ -16,3 +16,2 @@ } `; - })(Drupal);