Commit 3a839343 authored by bbaer's avatar bbaer
Browse files

Created a saveInProgress Variable

parent 0605fc9e
......@@ -35,6 +35,7 @@ var QfqNS = QfqNS || {};
// Since we cannot predict the effect on disable bubbling of the `input` and `paste` events, we resort to this
// home-brew solution.
this.inputAndPasteHandlerCalled = false;
this.saveInProgress = false;
if (!document.forms[this.formId]) {
throw new Error("Form '" + formId + "' does not exist.");
......@@ -168,6 +169,7 @@ var QfqNS = QfqNS || {};
}));
$("#save-button").removeClass('btn-warning active disabled');
$("#save-button").addClass('btn-default');
this.saveInProgress = false;
};
/**
......
......@@ -517,7 +517,9 @@ var QfqNS = QfqNS || {};
n.Log.debug("save click");
this.getSaveButton().removeClass('btn-info');
this.getSaveButton().addClass('btn-warning active disabled');
this.submit();
if (!this.form.saveInProgress) {
this.submit();
}
};
/**
......@@ -587,6 +589,7 @@ var QfqNS = QfqNS || {};
submitQueryParameters = $.extend({}, queryParameters, submitReason);
this.form.submitTo(this.submitTo, submitQueryParameters);
this.form.saveInProgress = true;
};
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment