<dd>
<select name="templateGroupID" id="templateGroupID">
<option value="0">{lang}wcf.acp.template.group.default{/lang}</option>
- {foreach from=$availableTemplateGroups item=templateGroup}
- <option value="{@$templateGroup->templateGroupID}"{if $templateGroup->templateGroupID == $templateGroupID} selected{/if}>{$templateGroup->getName()}</option>
- {/foreach}
+ {htmlOptions options=$availableTemplateGroups selected=$templateGroupID disableEncoding=true}
</select>
{if $errorField == 'templateGroupID'}
<small class="innerError">
use wcf\data\style\StyleAction;
use wcf\data\style\StyleEditor;
use wcf\data\template\group\TemplateGroup;
-use wcf\data\template\group\TemplateGroupList;
use wcf\form\AbstractForm;
use wcf\system\event\EventHandler;
use wcf\system\exception\SystemException;
$this->readStyleVariables();
}
- $templateGroupList = new TemplateGroupList();
- $templateGroupList->sqlOrderBy = "templateGroupName";
- $templateGroupList->getConditionBuilder()->add('templateGroupFolderName <> ?', ['_wcf_email/']);
- $templateGroupList->readObjects();
- $this->availableTemplateGroups = $templateGroupList->getObjects();
+ $this->availableTemplateGroups = TemplateGroup::getSelectList([-1], 1);
if (isset($_REQUEST['tmpHash'])) {
$this->tmpHash = StringUtil::trim($_REQUEST['tmpHash']);