2018-11-10 16:52:47 +01:00
|
|
|
$(document).ready(function(){
|
|
|
|
$("#button_newuser").click(function(){
|
2018-11-20 13:53:17 +01:00
|
|
|
$.post("/api/user/new",
|
2018-11-10 16:52:47 +01:00
|
|
|
{
|
|
|
|
username: $("#text_user").val(),
|
|
|
|
passwd: $("#text_passwd").val()
|
|
|
|
},
|
|
|
|
function(data){
|
2018-11-20 13:53:17 +01:00
|
|
|
if(data=="0"){
|
2018-11-14 16:25:50 +01:00
|
|
|
infoPopUp("Benutzer erfolgreich erstellt!", 100);
|
2018-11-10 16:52:47 +01:00
|
|
|
$("#text_user").val("");
|
|
|
|
$("#text_passwd").val("");
|
|
|
|
$("#adduser-button-done").removeClass("button-disabled");
|
|
|
|
}
|
|
|
|
else {
|
2018-11-14 16:25:50 +01:00
|
|
|
infoPopUp("Fehler bei der Benutzeranlage!", 100);
|
2018-11-10 16:52:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
$("#adduser-button-done").click(function(){
|
|
|
|
window.location.href = "/";
|
|
|
|
});
|
|
|
|
});
|