Modified the Change Password action to get the action on Server Privileges page also working

This commit is contained in:
ninadsp
2010-09-02 01:06:12 +05:30
committed by Marc Delisle
parent 56ec4130ae
commit 00250a9f59

View File

@@ -2298,10 +2298,17 @@ $(document).ready(function() {
*/ */
var the_form = $("#change_password_form"); var the_form = $("#change_password_form");
/**
* @var this_value String containing the value of the submit button.
* Need to append this for the change password form on Server Privileges
* page to work
*/
var this_value = $(this).val();
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$(the_form).append('<input type="hidden" name="ajax_request" value="true" />'); $(the_form).append('<input type="hidden" name="ajax_request" value="true" />');
$.post($(the_form).attr('action'), $(the_form).serialize(), function(data) { $.post($(the_form).attr('action'), $(the_form).serialize() + '&change_pw='+ this_value, function(data) {
if(data.success == true) { if(data.success == true) {
PMA_ajaxShowMessage(data.message); PMA_ajaxShowMessage(data.message);
@@ -2309,6 +2316,7 @@ $(document).ready(function() {
$("#topmenucontainer").after(data.sql_query); $("#topmenucontainer").after(data.sql_query);
$("#change_password_dialog").hide().remove(); $("#change_password_dialog").hide().remove();
$("#edit_user_dialog").dialog("close").remove();
} }
else { else {
PMA_ajaxShowMessage(data.error); PMA_ajaxShowMessage(data.error);