mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-27 15:40:00 +01:00
25 lines
679 B
JavaScript
25 lines
679 B
JavaScript
$(document).ready(function(){
|
|
$("#button_newuser").click(function(){
|
|
$.post("/php/edit-user.php",
|
|
{
|
|
function: "new-user",
|
|
username: $("#text_user").val(),
|
|
passwd: $("#text_passwd").val()
|
|
},
|
|
function(data){
|
|
if(data==0){
|
|
infoPopUp("Benutzer erfolgreich erstellt!", 100);
|
|
$("#text_user").val("");
|
|
$("#text_passwd").val("");
|
|
$("#adduser-button-done").removeClass("button-disabled");
|
|
}
|
|
else {
|
|
infoPopUp("Fehler bei der Benutzeranlage!", 100);
|
|
}
|
|
}
|
|
);
|
|
});
|
|
$("#adduser-button-done").click(function(){
|
|
window.location.href = "/";
|
|
});
|
|
});
|