<ul class="scrollableCheckboxList">
{foreach from=$availableBoxes item=availableBox}
<li>
- <label><input type="checkbox" name="boxIDs[]" value="{@$availableBox->boxID}"{if $availableBox->boxID|in_array:$boxIDs} checked="checked"{/if}> {$availableBox->name}</label>
+ <label><input type="checkbox" name="boxIDs[]" value="{@$availableBox->boxID}"{if $availableBox->boxID|in_array:$boxIDs} checked="checked"{/if}{if $availableBox->identifier == 'com.woltlab.wcf.MainMenu'} disabled{/if}> {$availableBox->name}</label>
</li>
{/foreach}
</ul>
// get available languages
$this->availableLanguages = LanguageFactory::getInstance()->getLanguages();
- // get boxes
+ // get available boxes
$boxList = new BoxList();
$boxList->sqlOrderBy = 'box.name';
$boxList->readObjects();
if (isset($_POST['metaDescription']) && is_array($_POST['metaDescription'])) $this->metaDescription = ArrayUtil::trim($_POST['metaDescription']);
if (isset($_POST['metaKeywords']) && is_array($_POST['metaKeywords'])) $this->metaKeywords = ArrayUtil::trim($_POST['metaKeywords']);
if (isset($_POST['boxIDs']) && is_array($_POST['boxIDs'])) $this->boxIDs = ArrayUtil::toIntegerArray($_POST['boxIDs']);
+ $box = Box::getBoxByIdentifier('com.woltlab.wcf.MainMenu');
+ if (!in_array($box->boxID, $this->boxIDs)) $this->boxIDs[] = $box->boxID;
if (isset($_POST['aclValues']) && is_array($_POST['aclValues'])) $this->aclValues = $_POST['aclValues'];
}
// call saved event
$this->saved();
+ // show success
+ WCF::getTPL()->assign('success', true);
+
// reset variables
$this->parentPageID = $this->isDisabled = $this->isLandingPage = 0;
$this->applicationPackageID = 1;