This commit is contained in:
2020-06-12 23:41:42 +00:00
parent 8be276b5b6
commit 7b452670f0
7 changed files with 184 additions and 74 deletions

View File

@@ -12,16 +12,34 @@ app.trialEdit = (function () {
//---------------- BEGIN MODULE SCOPE VARIABLES --------------
var
stateMap = {},
onSave, onDelete,
onApprove, onReject, onDelete,
configModule, initModule;
//----------------- END MODULE SCOPE VARIABLES ---------------
//------------------- BEGIN EVENT HANDLERS -------------------
//ONSAVE
//ONAPPROVE
//
onSave = function (event) {
onApprove = function (event) {
event.preventDefault();
$.gevent.publish('app-clear-error');
var isFetched=$('#fetched').prop('checked')
app.api.postAction('trial/fetched/' + stateMap.id + "/" + isFetched, function (res) {
if (res.error) {
$.gevent.publish('app-show-error', res.msg);
}
});
return false; //prevent default?
};
//ONREJECT
//
onReject = function (event) {
event.preventDefault();
$.gevent.publish('app-clear-error');
@@ -37,6 +55,7 @@ app.trialEdit = (function () {
return false; //prevent default?
};
//ONDELETE
//
onDelete = function (event) {