Commit 15ab7e4f authored by bbaer's avatar bbaer
Browse files

Required Show only implemented

parent 58b36cb8
Pipeline #2717 failed with stages
in 1 minute and 56 seconds
......@@ -67,6 +67,12 @@ var QfqNS = QfqNS || {};
this.form = new n.Form(this.formId, false);
}
if ($('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('required-show-only')) {
this.requiredShowOnly = true;
} else {
this.requiredShowOnly = false;
}
this.infoLockedButton = this.infoLockedButton.bind(this);
// This is required when displaying validation messages, in order to activate the tab, which has validation
......@@ -622,12 +628,17 @@ var QfqNS = QfqNS || {};
alert = new n.Alert("Form is incomplete.", "warning");
alert.timeout = 3000;
alert.show();
return;
if (!this.requiredShowOnly) {
return;
}
}
// First, remove all validation states, in case a previous submit has set a validation state, thus we're not
// stockpiling them.
this.clearAllValidationStates();
if (!this.requiredShowOnly) {
this.clearAllValidationStates();
}
submitReason = {
......
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