public function readFormParameters() {
parent::readFormParameters();
- $this->visibleEverywhere = $this->showOrder = 0;
+ $this->visibleEverywhere = $this->showHeader = $this->showOrder = 0;
if (isset($_POST['name'])) $this->name = StringUtil::trim($_POST['name']);
if (isset($_POST['boxType'])) $this->boxType = $_POST['boxType'];
if (isset($_POST['position'])) $this->position = $_POST['position'];
if (I18nHandler::getInstance()->isPlainValue('title')) $this->title = I18nHandler::getInstance()->getValue('title');
- $this->visibleEverywhere = $this->showOrder = 0;
+ $this->visibleEverywhere = $this->showHeader = $this->showOrder = 0;
if (isset($_POST['position'])) $this->position = $_POST['position'];
if (isset($_POST['showOrder'])) $this->showOrder = intval($_POST['showOrder']);
if (isset($_POST['visibleEverywhere'])) $this->visibleEverywhere = intval($_POST['visibleEverywhere']);
foreach ($this->objects as $box) {
$deleteStatement->execute([$box->boxID]);
+ $visibleEverywhere = (isset($this->parameters['data']['visibleEverywhere']) ? $this->parameters['data']['visibleEverywhere'] : $box->visibleEverywhere);
foreach ($this->parameters['pageIDs'] as $pageID) {
- $insertStatement->execute([$box->boxID, $pageID, ($box->visibleEverywhere ? 0 : 1)]);
+ $insertStatement->execute([$box->boxID, $pageID, ($visibleEverywhere ? 0 : 1)]);
}
}
}