initial user managemet

This commit is contained in:
mad
2018-08-15 13:50:00 +02:00
parent 3048e4e9a2
commit 4e3bde8249
7 changed files with 210 additions and 8 deletions
+29
View File
@@ -1,3 +1,13 @@
function makeid() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
function dropdown(i,e) {
document.getElementById(i).innerHTML = e;
document.getElementById(i +'h').value = e;
@@ -36,3 +46,22 @@ $('#confirm-delete').on('show.bs.modal', function(e) {
document.getElementById('modaltext2').innerHTML = data.deleteText;
$('.btn-ok', this).data({'deleteName': data.deleteName,'deleteVm': data.deleteVm});
});
function submitbutton(formid){
console.log(formid);
data = $('#'+ formid).serialize();
console.log(data);
// data: 'who='+ who +'&what='+ what,
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),
data: data,
success: function(response) {
if (response != "success"){
window.alert('Failure!\n'+ response);
} else {
window.location.href = "";
}
},
});
}