re-indent
This commit is contained in:
@@ -164,40 +164,39 @@ $(document).ready(function() {
|
|||||||
var button_options = {};
|
var button_options = {};
|
||||||
button_options[PMA_messages['strCreateUser']] = function() {
|
button_options[PMA_messages['strCreateUser']] = function() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var the_form stores reference to current form
|
* @var the_form stores reference to current form
|
||||||
*/
|
*/
|
||||||
var the_form = $(this).find("#addUsersForm");
|
var the_form = $(this).find("#addUsersForm");
|
||||||
|
|
||||||
if( ! checkAddUser($(the_form).get(0)) ) {
|
if( ! checkAddUser($(the_form).get(0)) ) {
|
||||||
PMA_ajaxShowMessage(PMA_messages['strFormEmpty']);
|
PMA_ajaxShowMessage(PMA_messages['strFormEmpty']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//We also need to post the value of the submit button in order to get this to work correctly
|
//We also need to post the value of the submit button in order to get this to work correctly
|
||||||
$.post($(the_form).attr('action'), $(the_form).serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) {
|
$.post($(the_form).attr('action'), $(the_form).serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) {
|
||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
$("#add_user_dialog").dialog("close").remove();
|
$("#add_user_dialog").dialog("close").remove();
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
$("#topmenucontainer")
|
$("#topmenucontainer")
|
||||||
.next('div')
|
.next('div')
|
||||||
.remove()
|
.remove()
|
||||||
.end()
|
.end()
|
||||||
.after(data.sql_query);
|
.after(data.sql_query);
|
||||||
|
|
||||||
//Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
|
//Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
|
||||||
var notice_class = $("#topmenucontainer").next("div").find('.notice');
|
var notice_class = $("#topmenucontainer").next("div").find('.notice');
|
||||||
if($(notice_class).text() == '') {
|
if($(notice_class).text() == '') {
|
||||||
$(notice_class).remove();
|
$(notice_class).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);
|
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);
|
||||||
}
|
} else {
|
||||||
else {
|
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
|
||||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
|
}
|
||||||
}
|
})
|
||||||
})
|
};
|
||||||
};
|
|
||||||
button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close").remove();}
|
button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close").remove();}
|
||||||
|
|
||||||
$.get($(this).attr("href"), {'ajax_request':true}, function(data) {
|
$.get($(this).attr("href"), {'ajax_request':true}, function(data) {
|
||||||
|
Reference in New Issue
Block a user