Toggle between dashicons-hidden and dashicons-visibility in the password hide/show button.

fixes #33135

git-svn-id: https://develop.svn.wordpress.org/trunk@33438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2015-07-27 03:12:55 +00:00
parent 3ad35be856
commit 80c9c8cfca
4 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -143,8 +143,8 @@
if ( show == 1 ) {
pwWrapper.addClass( 'show-password' );
pw_togglebtn.attr({ 'data-toggle': 0, 'aria-label': userProfileL10n.ariaHide })
.find( '.text' ).text( userProfileL10n.hide )
;
.find( '.text' ).text( userProfileL10n.hide );
pw_togglebtn.find( '.dashicons' ).removeClass('dashicons-visibility').addClass('dashicons-hidden');
pwFieldText.focus();
if ( ! _.isUndefined( pwFieldText[0].setSelectionRange ) ) {
pwFieldText[0].setSelectionRange( 0, 100 );
@@ -153,6 +153,7 @@
pwWrapper.removeClass( 'show-password' );
pw_togglebtn.attr({ 'data-toggle': 1, 'aria-label': userProfileL10n.ariaShow })
.find( '.text' ).text( userProfileL10n.show );
pw_togglebtn.find( '.dashicons' ).removeClass('dashicons-hidden').addClass('dashicons-visibility');
pw_field.focus();
if ( ! _.isUndefined( pw_field[0].setSelectionRange ) ) {
pw_field[0].setSelectionRange( 0, 100 );