Commit 16230f91 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'S8592-disabled-save-button-nicht-schoen' into 'master'

Fixed button display, added Alert instead of disabled button.

See merge request !160
parents d229bf35 a63f08ff
Pipeline #2015 passed with stages
in 2 minutes and 54 seconds
......@@ -67,6 +67,7 @@ var QfqNS = QfqNS || {};
this.form = new n.Form(this.formId, false);
}
this.infoLockedButton = this.infoLockedButton.bind(this);
// This is required when displaying validation messages, in order to activate the tab, which has validation
// issues
......@@ -822,12 +823,29 @@ var QfqNS = QfqNS || {};
n.QfqForm.prototype.deactivateSaveButton = function () {
this.getSaveButton().addClass("disabled");
this.getSaveButton().attr("disabled", "disabled");
//this.getSaveButton().attr("disabled", "disabled");
this.getSaveButton().off('click');
this.getSaveButton().on('click', this.infoLockedButton);
this.getSaveButton().css("color", "#fff");
};
n.QfqForm.prototype.infoLockedButton = function(e) {
var alert = new n.Alert({
message: "Please wait until the upload finishes to save this form",
buttons: [{ label: "Ok", eventName: "ok"}],
modal: true
});
alert.show();
e.preventDefault();
return false;
};
n.QfqForm.prototype.activateSaveButton = function () {
this.getSaveButton().off('click');
this.getSaveButton().removeClass("disabled");
this.getSaveButton().removeAttr("disabled");
//this.getSaveButton().removeAttr("disabled");
this.getSaveButton().css("color", "");
this.getSaveButton().click(this.handleSaveClick.bind(this));
};
n.QfqForm.prototype.getSaveButtonAttentionClass = function () {
......
Markdown is supported
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