Commit 6ee8e007 authored by bbaer's avatar bbaer
Browse files

Refactor: skipRequiredCheck / data-skip-required-check

parent a0f35098
Pipeline #2725 passed with stages
in 2 minutes and 45 seconds
......@@ -67,10 +67,10 @@ var QfqNS = QfqNS || {};
this.form = new n.Form(this.formId, false);
}
if ($('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('required-show-only')) {
this.requiredShowOnly = true;
if ($('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('skip-required-check')) {
this.skipRequiredCheck = true;
} else {
this.requiredShowOnly = false;
this.skipRequiredCheck = false;
}
this.infoLockedButton = this.infoLockedButton.bind(this);
......@@ -629,14 +629,14 @@ var QfqNS = QfqNS || {};
alert.timeout = 3000;
alert.show();
if (!this.requiredShowOnly) {
if (!this.skipRequiredCheck) {
return;
}
}
// First, remove all validation states, in case a previous submit has set a validation state, thus we're not
// stockpiling them.
if (!this.requiredShowOnly) {
if (!this.skipRequiredCheck) {
this.clearAllValidationStates();
}
......
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