<dd>
<select name="templateGroupID" id="templateGroupID">
<option value="0">{lang}wcf.acp.template.group.default{/lang}</option>
- {foreach from=$availableTemplateGroups item=availableTemplateGroup}
- <option value="{@$availableTemplateGroup->templateGroupID}"{if $availableTemplateGroup->templateGroupID == $templateGroupID} selected="selected"{/if}>{$availableTemplateGroup->templateGroupName}</option>
- {/foreach}
+ {htmlOptions options=$availableTemplateGroups selected=$templateGroupID disableEncoding=true}
</select>
</dd>
</dl>
<?php
namespace wcf\acp\page;
use wcf\data\package\PackageCache;
-use wcf\data\template\group\TemplateGroupList;
+use wcf\data\template\group\TemplateGroup;
use wcf\page\SortablePage;
use wcf\system\application\ApplicationHandler;
use wcf\system\WCF;
parent::readData();
// get template groups
- $templateGroupList = new TemplateGroupList();
- $templateGroupList->sqlOrderBy = "templateGroupName";
- $templateGroupList->readObjects();
- $this->availableTemplateGroups = $templateGroupList->getObjects();
+ $this->availableTemplateGroups = TemplateGroup::getSelectList(array(), 1);
// get applications
$applications = ApplicationHandler::getInstance()->getApplications();