const request = { get: function (url, callback) { let xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState === 4 && xmlHttp.status === 200) callback(xmlHttp.responseText); }; xmlHttp.open("GET", url, true); xmlHttp.send(); }, post: function (url, callback, data) { let xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState === 4 && xmlHttp.status === 200) callback(xmlHttp.responseText); }; xmlHttp.open("POST", url, true); xmlHttp.send(this.formatParams(data)); }, formatParams: function (params) { return Object.keys(params).map((key) => { return key+"="+encodeURIComponent(params[key]) }).join("&") } }; const defaultColumnInputs = { 'service_id': ``, 'servtype': ``, 'subtype': ``, 'user_id': ``, 'referrer_user_id': ``, 'state': ``, 'creation_date': ``, 'creation_time': ``, 'creation_request_sent_date': ``, 'notified_about_expiration': `` }; const baseFormFields = `
`; const formCreateButtons = `