mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
25 lines
669 B
JavaScript
25 lines
669 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!");
|
|
$("#text_user").val("");
|
|
$("#text_passwd").val("");
|
|
$("#adduser-button-done").removeClass("button-disabled");
|
|
}
|
|
else {
|
|
infoPopUp("Fehler bei der Benutzeranlage!");
|
|
}
|
|
}
|
|
);
|
|
});
|
|
$("#adduser-button-done").click(function(){
|
|
window.location.href = "/";
|
|
});
|
|
});
|