Clean notice after update password + fix addText function

See BT#12323
ofaj
jmontoyaa 9 years ago
parent c41601266a
commit afe60be3fe
  1. 1
      main/auth/inscription.php
  2. 14
      main/inc/lib/api.lib.php

@ -216,6 +216,7 @@ if ($user_already_registered_show_terms === false) {
$form->addText( $form->addText(
'username', 'username',
get_lang('UserName'), get_lang('UserName'),
true,
array( array(
'id' => 'username', 'id' => 'username',
'size' => USERNAME_MAX_LENGTH, 'size' => USERNAME_MAX_LENGTH,

@ -7173,7 +7173,7 @@ function api_get_password_checker_js($usernameInputId, $passwordInputId)
$js = api_get_asset('pwstrength-bootstrap/dist/pwstrength-bootstrap.min.js'); $js = api_get_asset('pwstrength-bootstrap/dist/pwstrength-bootstrap.min.js');
$js .= "<script> $js .= "<script>
$(document).ready(function() { $(document).ready(function() {
var lang = ".json_encode($translations)."; var lang = ".json_encode($translations).";
var options = { var options = {
common : { common : {
@ -7226,9 +7226,9 @@ function api_get_password_checker_js($usernameInputId, $passwordInputId)
onLoad : function () { onLoad : function () {
//$('#messages').text('Start typing password'); //$('#messages').text('Start typing password');
}, },
onKeyUp: function (evt) { onKeyUp: function (evt) {
$(evt.target).pwstrength('outputErrorList'); $(evt.target).pwstrength('outputErrorList');
}, },
viewports: { viewports: {
progress: '#password_progress', progress: '#password_progress',
verdict: '#password-verdict', verdict: '#password-verdict',
@ -7243,6 +7243,12 @@ function api_get_password_checker_js($usernameInputId, $passwordInputId)
} }
}; };
$('".$passwordInputId."').pwstrength(options); $('".$passwordInputId."').pwstrength(options);
$('".$passwordInputId."').on('input', function() {
$(this).parent().find('.help-inline').hide();
});
}); });
</script>"; </script>";

Loading…
Cancel
Save