@@ -461,6 +461,10 @@ const CheckAddUser = {
461461 }
462462} ;
463463
464+ const selectPasswordRadioWhenChangingPassword = ( ) => {
465+ $ ( '#nopass_0' ) . prop ( 'checked' , true ) ;
466+ } ;
467+
464468/**
465469 * AJAX scripts for /server/privileges page.
466470 *
@@ -483,6 +487,9 @@ const CheckAddUser = {
483487window . AJAX . registerTeardown ( 'server/privileges.js' , function ( ) {
484488 $ ( '#fieldset_add_user_login' ) . off ( 'change' , 'input[name=\'username\']' ) ;
485489 $ ( document ) . off ( 'click' , '#deleteUserCard .btn.ajax' ) ;
490+ $ ( '#text_pma_change_pw' ) . off ( 'keyup' ) ;
491+ $ ( '#text_pma_change_pw' ) . off ( 'change' ) ;
492+ $ ( '#text_pma_change_pw2' ) . off ( 'change' ) ;
486493
487494 const editUserGroupModal = document . getElementById ( 'editUserGroupModal' ) ;
488495 if ( editUserGroupModal ) {
@@ -504,6 +511,8 @@ window.AJAX.registerOnload('server/privileges.js', function () {
504511 $ ( '#text_pma_pw' ) . on ( 'keyup' , PasswordStrength . handleEvent ) ;
505512 $ ( '#text_pma_pw' ) . on ( 'input' , SwitchToUseTextField . handleEvent ) ;
506513 $ ( '#text_pma_change_pw' ) . on ( 'keyup' , ChangePasswordStrength . handleEvent ) ;
514+ $ ( '#text_pma_change_pw' ) . on ( 'change' , selectPasswordRadioWhenChangingPassword ) ;
515+ $ ( '#text_pma_change_pw2' ) . on ( 'change' , selectPasswordRadioWhenChangingPassword ) ;
507516 $ ( document ) . on ( 'change' , '#select_authentication_plugin' , ShowSha256PasswordNotice . handleEvent ) ;
508517 $ ( document ) . on ( 'click' , '#deleteUserCard .btn.ajax' , RevokeUser . handleEvent ) ;
509518
0 commit comments