Skip to content
Snippets Groups Projects
Commit 54fe2d3d authored by bbaer's avatar bbaer
Browse files

Required Show only implemented

parent 8c5a4d37
No related branches found
No related tags found
1 merge request!201F9617 save required
......@@ -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 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment