<dt><label for="templateGroupID">{lang}wcf.acp.template.group{/lang}</label></dt>
<dd>
<select name="templateGroupID" id="templateGroupID">
- {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>
use wcf\data\package\Package;
use wcf\data\package\PackageCache;
use wcf\data\template\group\TemplateGroup;
-use wcf\data\template\group\TemplateGroupList;
use wcf\data\template\Template;
use wcf\data\template\TemplateAction;
use wcf\form\AbstractForm;
public function readData() {
parent::readData();
- $templateGroupList = new TemplateGroupList();
- $templateGroupList->sqlOrderBy = "templateGroupName";
- $templateGroupList->readObjects();
- $this->availableTemplateGroups = $templateGroupList->getObjects();
+ $this->availableTemplateGroups = TemplateGroup::getSelectList();
if (!count($_POST) && $this->copiedTemplate !== null) {
$this->tplName = $this->copiedTemplate->templateName;