initial user managemet
This commit is contained in:
@@ -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 = "";
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user