static.js.admin.users.edit.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of formkiq-server Show documentation
Show all versions of formkiq-server Show documentation
Server-side integration for the FormKiQ ios application
function saveUser(sel, url, successcallback) {
var data = sel.serialize();
$.ajax({
type : 'POST',
url : url + "?" + data,
contentType: 'application/json; charset=utf-8',
dataType : 'json',
success : function(data) {
hidemessages();
showsuccess(sel, "User Saved");
typeof successcallback === 'function' && successcallback(data);
},
error: function (data) {
hidemessages();
var text = JSON.parse(data.responseText)
showerror(sel, "Unable to Save - " + text.message);
}
});
}
$(document).ready(function() {
$(".saveuser").submit(function(event) {
saveUser($(this), "/api/users/save");
return false;
});
});