Commit 3d09a019 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B13677_fe_preview_disabled_when_new_required' into 'develop'

B13677 Implemented variable to get required new from form and set status of...

See merge request !418
parents f14f02a6 7e961fa1
Pipeline #6973 passed with stage
in 1 minute and 46 seconds
......@@ -245,6 +245,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$form = false;
$url = '';
$status = '';
$requiredNew = '';
switch ($this->formSpec[F_NAME]) {
case 'form':
......@@ -253,6 +254,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
case 'formElement':
if (false !== ($formId = $this->store->getVar(FE_FORM_ID, STORE_SIP . STORE_RECORD))) {
$row = $this->dbArray[$this->dbIndexQfq]->sql("SELECT `f`.`name` FROM `Form` AS f WHERE `id`=" . $formId, ROW_EXPECT_1);
$rowRequiredNew = $this->dbArray[$this->dbIndexQfq]->sql("SELECT `f`.`requiredParameterNew` FROM `Form` AS f WHERE `id`=" . $formId, ROW_EXPECT_1);
$requiredNew = current($rowRequiredNew);
$form = current($row);
}
break;
......@@ -264,7 +267,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
$toolTip = "Form not 'form' or 'formElement'";
$status = 'disabled';
} else {
$requiredNew = $this->store->getVar(F_REQUIRED_PARAMETER_NEW, STORE_RECORD . STORE_EMPTY);
if($requiredNew === ''){
$requiredNew = $this->store->getVar(F_REQUIRED_PARAMETER_NEW, STORE_RECORD . STORE_EMPTY);
}
if (trim($requiredNew) !== '') {
$toolTip = "Form has 'required new' parameters and therefore cannot be previewed.";
$status = 'disabled';
......
Supports Markdown
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