File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 371
371
<!-- Password Validation -->
372
372
< div class ="group "> Password Validation</ div >
373
373
< form class ="form form-bordered no-submit ">
374
- < input type ="password " name ="password " id ="password-validation-password "
375
- class ="form-control " placeholder ="Password " />
374
+ < div class ="input-group ">
375
+ < input type ="password " name ="password " id ="password-validation-password "
376
+ class ="form-control " placeholder ="Password " />
377
+ < div class ="input-group-btn ">
378
+ < button class ="btn btn-default " type ="button " id ="password-validation-view-password " aria-label ="View password ">
379
+ < span class ="glyphicon glyphicon-eye-open " aria-hidden ="true "> </ span >
380
+ </ button >
381
+ </ div >
382
+ </ div >
376
383
< ul class ="list-group " id ="password-validation-requirements ">
377
384
< li class ="list-group-item " id ="password-validation-meets-min-length ">
378
385
Password must be at least < span id ="password-validation-min-length "> 6</ span > characters.
Original file line number Diff line number Diff line change @@ -577,6 +577,18 @@ function onValidatePassword() {
577
577
) ;
578
578
}
579
579
580
+ /**
581
+ * Toggles text visibility for the password validation input field.
582
+ */
583
+ function onToggleViewPasswordForValidation ( ) {
584
+ const id = '#password-validation-password' ;
585
+ if ( $ ( id ) . prop ( 'type' ) === 'password' ) {
586
+ $ ( id ) . prop ( 'type' , 'text' ) ;
587
+ } else {
588
+ $ ( id ) . prop ( 'type' , 'password' ) ;
589
+ }
590
+ }
591
+
580
592
/**
581
593
* Signs in with a generic IdP credential.
582
594
*/
@@ -2118,6 +2130,9 @@ function initApp() {
2118
2130
$ ( '.set-tenant-id' ) . click ( onSetTenantID ) ;
2119
2131
$ ( '#initialize-recaptcha-config' ) . click ( onInitializeRecaptchaConfig ) ;
2120
2132
$ ( '#password-validation-password' ) . keyup ( onValidatePassword ) ;
2133
+ $ ( '#password-validation-view-password' ) . click (
2134
+ onToggleViewPasswordForValidation
2135
+ ) ;
2121
2136
$ ( '#sign-in-with-generic-idp-credential' ) . click (
2122
2137
onSignInWithGenericIdPCredential
2123
2138
) ;
You can’t perform that action at this time.
0 commit comments