Remove close option from workflow settings menu

This commit is contained in:
guerler
2019-04-30 15:17:48 -04:00
parent 7512df35d2
commit 8527d0c5cf
@@ -68,30 +68,6 @@ export default Backbone.View.extend({
var self = (window.workflow_globals.app = this);
this.options = options;
this.urls = (options && options.urls) || {};
var close_editor = () => {
self.workflow.check_changes_in_active_form();
if (self.workflow && self.workflow.has_changes) {
var do_close = () => {
window.onbeforeunload = undefined;
window.document.location = self.urls.workflow_index;
};
show_modal(
"Close workflow editor",
"There are unsaved changes to your workflow which will be lost.",
{
Cancel: hide_modal,
"Save Changes": function() {
save_current_workflow(null, do_close);
}
},
{
"Don't Save": do_close
}
);
} else {
window.document.location = self.urls.workflow_index;
}
};
var workflow_index = self.urls.workflow_index;
var save_current_workflow = (eventObj, success_callback) => {
show_message("Saving workflow", "progress");
@@ -389,8 +365,7 @@ export default Backbone.View.extend({
Download: {
url: `${getAppRoot()}api/workflows/${self.options.id}/download?format=json-download`,
action: function() {}
},
Close: close_editor
}
});
}