The branch, master has been updated via 7b73bd180cceb9f304ed742f925b3ace4277047f (commit) from f80b603a5499ce2d2ba219525cccce17cfdcdf8c (commit)
- Log ----------------------------------------------------------------- commit 7b73bd180cceb9f304ed742f925b3ace4277047f Author: Marc Delisle marc@infomarc.info Date: Wed Feb 2 12:59:02 2011 -0500
Conditional Ajax for change password form
-----------------------------------------------------------------------
Summary of changes: 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 12831a1..164e98d 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 e7bdad2..4dcb2c9 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 ?> -<form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" onsubmit="return checkPassword(this)"> + <form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?> onsubmit="return checkPassword(this)"> <?php echo PMA_generate_common_hidden_inputs(); if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) { echo '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
hooks/post-receive