From 7b73bd180cceb9f304ed742f925b3ace4277047f Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 2 Feb 2011 12:59:02 -0500 Subject: [PATCH] Conditional Ajax for change password form --- js/functions.js | 3 ++- libraries/display_change_password.lib.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index 12831a132..164e98d55 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2007,8 +2007,9 @@ $(document).ready(function() { * Attach Ajax event handler for Change Password form submission * * @uses PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] */ - $("#change_password_form").find('input[name=change_pw]').live('click', function(event) { + $("#change_password_form.ajax").find('input[name=change_pw]').live('click', function(event) { event.preventDefault(); /** diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index e7bdad29e..4dcb2c907 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -19,7 +19,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) // Displays the form ?> -
+ onsubmit="return checkPassword(this)"> ' . "\n"