Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
|
@ -12,6 +12,10 @@
|
|||
* check that its confirmation is correct.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches password strength indicator and other relevant validation to
|
||||
* password fields.
|
||||
*/
|
||||
Drupal.behaviors.password = {
|
||||
attach: function (context, settings) {
|
||||
|
|
@ -31,7 +35,7 @@
|
|||
$passwordInputParentWrapper
|
||||
.find('input.js-password-confirm')
|
||||
.parent()
|
||||
.append('<div class="password-confirm js-password-confirm">' + translate.confirmTitle + ' <span></span></div>')
|
||||
.append('<div aria-live="polite" aria-atomic="true" class="password-confirm js-password-confirm">' + translate.confirmTitle + ' <span></span></div>')
|
||||
.addClass('confirm-parent');
|
||||
|
||||
var $confirmInput = $passwordInputParentWrapper.find('input.js-password-confirm');
|
||||
|
|
@ -40,7 +44,7 @@
|
|||
|
||||
// If the password strength indicator is enabled, add its markup.
|
||||
if (settings.password.showStrengthIndicator) {
|
||||
var passwordMeter = '<div class="password-strength"><div class="password-strength__meter"><div class="password-strength__indicator js-password-strength__indicator"></div></div><div class="password-strength__title">' + translate.strengthTitle + ' </div><div class="password-strength__text js-password-strength__text" aria-live="assertive"></div></div>';
|
||||
var passwordMeter = '<div class="password-strength"><div class="password-strength__meter"><div class="password-strength__indicator js-password-strength__indicator"></div></div><div aria-live="polite" aria-atomic="true" class="password-strength__title">' + translate.strengthTitle + ' <span class="password-strength__text js-password-strength__text"></span></div></div>';
|
||||
$confirmInput.parent().after('<div class="password-suggestions description"></div>');
|
||||
$passwordInputParent.append(passwordMeter);
|
||||
$passwordSuggestions = $passwordInputParentWrapper.find('div.password-suggestions').hide();
|
||||
|
|
@ -104,9 +108,12 @@
|
|||
* Returns the estimated strength and the relevant output message.
|
||||
*
|
||||
* @param {string} password
|
||||
* The password to evaluate.
|
||||
* @param {object} translate
|
||||
* An object containing the text to display for each strength level.
|
||||
*
|
||||
* @return {object}
|
||||
* An object containing strength, message, indicatorText and indicatorClass.
|
||||
*/
|
||||
Drupal.evaluatePasswordStrength = function (password, translate) {
|
||||
password = password.trim();
|
||||
|
|
|
|||
Reference in a new issue