only try to create the user once
This commit is contained in:
parent
7362f103ed
commit
e6bc6a29b9
|
@ -216,11 +216,16 @@ $(document).ready(function(){
|
|||
// Create a new user
|
||||
$( "#createuserbutton" )
|
||||
.click(function(){
|
||||
if(!$( "#createuserbutton" ).data('active')){
|
||||
$( "#createuserbutton" ).data('active',true);
|
||||
|
||||
// Create the post data
|
||||
var post = $( "#createuserdata" ).serialize();
|
||||
|
||||
// Ajax call
|
||||
$.post( 'ajax/createuser.php', post, function(data){
|
||||
$( "#createuserbutton" ).data('active',false);
|
||||
|
||||
// If it says "success" then we are happy
|
||||
if( data.status == "success" ){
|
||||
userCreated( data.data.username, data.data.groups );
|
||||
|
@ -229,6 +234,7 @@ $(document).ready(function(){
|
|||
printError( data.data.message );
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue