Fix Display Only

This commit is contained in:
Thomas Peterson 2020-06-11 17:20:18 +02:00
parent b2c015a3b2
commit 4c7fa60272
4 changed files with 28 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class Calc
if($edge->getFormel() != "") {
$formel = $this->formelCalc->parse($edge->getFormel());
if ($formel != "" && $option->getId() != 'weight' && !$option->isAjaxExport()) {
if ($formel != "" && $option->getId() != 'weight' && !$option->isAjaxExport() && !$option->isDisplayOnly()) {
$p = 0;
$formel = str_replace("tonumber", '$this->toNumber', $formel);

View File

@ -31,6 +31,9 @@ class Base
if(isset($this->node['exportAjax']) && (string)$this->node['exportAjax'] == 1) {
$this->element->setIsAjaxExport(true);
}
if(isset($this->node['displayOnly']) && (string)$this->node['displayOnly'] == 1) {
$this->element->setIsDisplayOnly(true);
}
}

View File

@ -38,6 +38,9 @@ class Base
/** @var bool */
protected $isAjaxExport = false;
/** @var bool */
protected $isDisplayOnly = false;
protected $savedCalcValues = [];
public function __construct()
@ -249,4 +252,20 @@ class Base
{
$this->savedCalcValues = $savedCalcValues;
}
/**
* @return bool
*/
public function isDisplayOnly()
{
return $this->isDisplayOnly;
}
/**
* @param bool $isDisplayOnly
*/
public function setIsDisplayOnly($isDisplayOnly)
{
$this->isDisplayOnly = $isDisplayOnly;
}
}

View File

@ -89,6 +89,11 @@
<grenze calc_value="$PMEK10001$P">0-660</grenze>
</formatwidth>
</option>
<option id="displayOnly" name="displayOnly" type="Hidden" displayOnly="1">
<seiten>
<grenze formel="5">0-</grenze>
</seiten>
</option>
<option id="farbe" name="Farbigkeit" type="Select" default="4f4f">
<!--
<opt id="4f" name="einseitig farbig (4/0-farbig Euroskala)"><seiten><grenze calc_value="($CV4cklick_formatwidth$CV)">1</grenze></seiten></opt>