mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-30 16:40:36 +01:00
26 lines
669 B
JavaScript
26 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 = "/";
|
||
|
});
|
||
|
});
|