Commit 7e961fa1 authored by enured's avatar enured
Browse files

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

B13677 Implemented variable to get required new from form and set status of formelement preview button correctly.
parent ccbda057
Pipeline #6942 passed with stage
in 2 minutes and 8 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