Commit f1273957 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Implements #9617. Form.formModeGlobal was missing. STORE_SIP overwrites form definition.

parent 472094b3
Pipeline #2727 passed with stages
in 2 minutes and 36 seconds
......@@ -594,8 +594,12 @@ class BuildFormBootstrap extends AbstractBuildForm {
$attribute['class'] = 'form-horizontal';
$attribute['data-toggle'] = 'validator';
$flag = $this->store::getVar(F_MODE_GLOBAL, STORE_SIP);
if ($flag == F_MODE_SKIP_REQUIRED_CHECK || $flag == F_MODE_REQUIRED_OFF) {
$formModeGlobal = $this->store::getVar(F_MODE_GLOBAL, STORE_SIP . STORE_EMPTY);
if ($formModeGlobal == '') {
$formModeGlobal = $this->formSpec[F_MODE_GLOBAL] ?? '';
}
if ($formModeGlobal == F_MODE_SKIP_REQUIRED_CHECK || $formModeGlobal == F_MODE_REQUIRED_OFF) {
$attribute[DATA_SKIP_REQUIRED_CHECK] = 'true';
}
if (isset($this->formSpec[F_SAVE_BUTTON_ACTIVE]) && $this->formSpec[F_SAVE_BUTTON_ACTIVE] != '0') {
......
......@@ -532,4 +532,5 @@ EOF;
public static function booleParameter($data) {
return $data == '' || $data == '1';
}
}
\ No newline at end of file
......@@ -544,7 +544,11 @@ class Save {
*/
public function checkRequiredHidden() {
$formModeGlobal = $this->store->getVar(F_MODE_GLOBAL, STORE_SIP);
$formModeGlobal = $this->store->getVar(F_MODE_GLOBAL, STORE_SIP . STORE_EMPTY);
if ($formModeGlobal == '') {
$formModeGlobal = $this->formSpec[F_MODE_GLOBAL] ?? '';
}
$reportRequiredFailed = ($formModeGlobal != F_MODE_REQUIRED_OFF && $formModeGlobal != F_MODE_SKIP_REQUIRED_CHECK);
$clientValues = $this->store::getStore(STORE_FORM);
......
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