<!-- general.image -->
<option name="image_adapter_type">
<categoryname>general.image</categoryname>
- <optiontype>radiobuttons</optiontype>
+ <optiontype>radioButton</optiontype>
<defaultvalue><![CDATA[gd]]></defaultvalue>
<selectoptions>
<![CDATA[gd:wcf.acp.option.image_adapter_type.gd
<!-- mail.send -->
<option name="mail_send_method">
<categoryname>general.mail.send</categoryname>
- <optiontype>radiobuttons</optiontype>
+ <optiontype>radioButton</optiontype>
<defaultvalue><![CDATA[php]]></defaultvalue>
<selectoptions><![CDATA[php:wcf.acp.option.mail_send_method.php
smtp:wcf.acp.option.mail_send_method.smtp
<!-- general.cache -->
<option name="cache_source_type">
<categoryname>general.cache.general</categoryname>
- <optiontype>radiobuttons</optiontype>
+ <optiontype>radioButton</optiontype>
<defaultvalue><![CDATA[disk]]></defaultvalue>
<selectoptions><![CDATA[disk:wcf.acp.option.cache_source_type.disk
memcache:wcf.acp.option.cache_source_type.memcache
--- /dev/null
+<input type="checkbox" id="{$option->optionName}" {if $value} checked="checked"{/if} name="values[{$option->optionName}]" value="1" {if $disableOptions || $enableOptions}class="enablesOptions" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]" {/if} />
--- /dev/null
+<select id="{$option->optionName}" name="values[{$option->optionName}][]" multiple="multiple" size="{if $selectOptions|count > 10}10{else}{@$selectOptions|count}{/if}">
+{foreach from=$selectOptions key=key item=selectOption}
+ <option value="{$key}"{if $key|in_array:$value} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
+{/foreach}
+</select>
+++ /dev/null
-<input type="checkbox" id="{$option->optionName}" {if $value} checked="checked"{/if} name="values[{$option->optionName}]" value="1" {if $disableOptions || $enableOptions}class="enablesOptions" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]" {/if} />
+++ /dev/null
-<select id="{$option->optionName}" name="values[{$option->optionName}][]" multiple="multiple" size="{if $selectOptions|count > 10}10{else}{@$selectOptions|count}{/if}">
-{foreach from=$selectOptions key=key item=selectOption}
- <option value="{$key}"{if $key|in_array:$value} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
-{/foreach}
-</select>
+++ /dev/null
-<fieldset>
- <dl>
- {foreach from=$selectOptions key=key item=selectOption}
- <dd>
- <label><input type="radio" name="values[{$option->optionName}]" value="{$key}" {if $value == $key} checked="checked"{/if} {if $disableOptions[$key]|isset || $enableOptions[$key]|isset}class="enablesOptions" data-disable-options="[ {@$disableOptions[$key]}]" data-enable-options="[ {@$enableOptions[$key]}]"{/if} /> {lang}{@$selectOption}{/lang}</label>
- </dd>
- {/foreach}
- </dl>
-</fieldset>
+++ /dev/null
-<select id="{$option->optionName}" name="values[{$option->optionName}]">
-{foreach from=$selectOptions key=key item=selectOption}
- <option value="{$key}"{if $value == $key} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
-{/foreach}
-</select>
\ No newline at end of file
+++ /dev/null
-<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if} />
\ No newline at end of file
+++ /dev/null
-<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10">{$value}</textarea>
\ No newline at end of file
--- /dev/null
+<fieldset>
+ <dl>
+ {foreach from=$selectOptions key=key item=selectOption}
+ <dd>
+ <label><input type="radio" name="values[{$option->optionName}]" value="{$key}" {if $value == $key} checked="checked"{/if} {if $disableOptions[$key]|isset || $enableOptions[$key]|isset}class="enablesOptions" data-disable-options="[ {@$disableOptions[$key]}]" data-enable-options="[ {@$enableOptions[$key]}]"{/if} /> {lang}{@$selectOption}{/lang}</label>
+ </dd>
+ {/foreach}
+ </dl>
+</fieldset>
--- /dev/null
+<select id="{$option->optionName}" name="values[{$option->optionName}]">
+{foreach from=$selectOptions key=key item=selectOption}
+ <option value="{$key}"{if $value == $key} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
+{/foreach}
+</select>
\ No newline at end of file
--- /dev/null
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
+ var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+ new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
+ });
+ //]]>
+</script>
+<input type="{@$inputType}" id="{$option->optionName}" name="{$option->optionName}" value="{$i18nPlainValues[$option->optionName]}" />
--- /dev/null
+<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if} />
\ No newline at end of file
--- /dev/null
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
+ var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+ new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
+ });
+ //]]>
+</script>
+<textarea id="{$option->optionName}" name="{$option->optionName}" cols="40" rows="10">{$i18nPlainValues[$option->optionName]}</textarea>
--- /dev/null
+<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10">{$value}</textarea>
\ No newline at end of file
--- /dev/null
+<input type="checkbox" id="{$option->optionName}" {if $value} checked="checked"{/if} name="values[{$option->optionName}]" value="1" {if $disableOptions || $enableOptions}class="enablesOptions" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]" {/if} />
--- /dev/null
+<select id="{$option->optionName}" name="values[{$option->optionName}][]" multiple="multiple" size="{if $selectOptions|count > 10}10{else}{@$selectOptions|count}{/if}">
+{foreach from=$selectOptions key=key item=selectOption}
+ <option value="{$key}"{if $key|in_array:$value} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
+{/foreach}
+</select>
+++ /dev/null
-<input type="checkbox" id="{$option->optionName}" {if $value} checked="checked"{/if} name="values[{$option->optionName}]" value="1" {if $disableOptions || $enableOptions}class="enablesOptions" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]" {/if} />
+++ /dev/null
-<select id="{$option->optionName}" name="values[{$option->optionName}][]" multiple="multiple" size="{if $selectOptions|count > 10}10{else}{@$selectOptions|count}{/if}">
-{foreach from=$selectOptions key=key item=selectOption}
- <option value="{$key}"{if $key|in_array:$value} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
-{/foreach}
-</select>
+++ /dev/null
-<fieldset>
- <dl>
- {foreach from=$selectOptions key=key item=selectOption}
- <dd>
- <label><input type="radio" name="values[{$option->optionName}]" value="{$key}" {if $value == $key} checked="checked"{/if} {if $disableOptions[$key]|isset || $enableOptions[$key]|isset}class="enablesOptions" data-disable-options="[ {@$disableOptions[$key]}]" data-enable-options="[ {@$enableOptions[$key]}]"{/if} /> {lang}{@$selectOption}{/lang}</label>
- </dd>
- {/foreach}
- </dl>
-</fieldset>
+++ /dev/null
-<select id="{$option->optionName}" name="values[{$option->optionName}]">
-{foreach from=$selectOptions key=key item=selectOption}
- <option value="{$key}"{if $value == $key} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
-{/foreach}
-</select>
\ No newline at end of file
+++ /dev/null
-<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if} />
\ No newline at end of file
+++ /dev/null
-<script type="text/javascript">
- //<![CDATA[
- $(function() {
- var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
- var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
- new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
- });
- //]]>
-</script>
-<input type="{@$inputType}" id="{$option->optionName}" name="{$option->optionName}" value="{$i18nPlainValues[$option->optionName]}" />
+++ /dev/null
-<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10">{$value}</textarea>
\ No newline at end of file
+++ /dev/null
-<script type="text/javascript">
- //<![CDATA[
- $(function() {
- var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
- var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
- new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
- });
- //]]>
-</script>
-<textarea id="{$option->optionName}" name="{$option->optionName}" cols="40" rows="10">{$i18nPlainValues[$option->optionName]}</textarea>
--- /dev/null
+<fieldset>
+ <dl>
+ {foreach from=$selectOptions key=key item=selectOption}
+ <dd>
+ <label><input type="radio" name="values[{$option->optionName}]" value="{$key}" {if $value == $key} checked="checked"{/if} {if $disableOptions[$key]|isset || $enableOptions[$key]|isset}class="enablesOptions" data-disable-options="[ {@$disableOptions[$key]}]" data-enable-options="[ {@$enableOptions[$key]}]"{/if} /> {lang}{@$selectOption}{/lang}</label>
+ </dd>
+ {/foreach}
+ </dl>
+</fieldset>
--- /dev/null
+<select id="{$option->optionName}" name="values[{$option->optionName}]">
+{foreach from=$selectOptions key=key item=selectOption}
+ <option value="{$key}"{if $value == $key} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option>
+{/foreach}
+</select>
\ No newline at end of file
--- /dev/null
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
+ var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+ new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
+ });
+ //]]>
+</script>
+<input type="{@$inputType}" id="{$option->optionName}" name="{$option->optionName}" value="{$i18nPlainValues[$option->optionName]}" />
--- /dev/null
+<input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if} />
\ No newline at end of file
--- /dev/null
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
+ var $optionValues = { {implode from=$i18nValues[$option->optionName] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+ new WCF.MultipleLanguageInput('{$option->optionName}', false, $optionValues, $availableLanguages);
+ });
+ //]]>
+</script>
+<textarea id="{$option->optionName}" name="{$option->optionName}" cols="40" rows="10">{$i18nPlainValues[$option->optionName]}</textarea>
--- /dev/null
+<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10">{$value}</textarea>
\ No newline at end of file
'option' => $option,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeBoolean');
+ return WCF::getTPL()->fetch('booleanOptionType');
}
/**
--- /dev/null
+<?php
+namespace wcf\system\option;
+use wcf\data\option\Option;
+use wcf\system\database\util\PreparedStatementConditionBuilder;
+use wcf\system\exception\UserInputException;
+use wcf\system\WCF;
+use wcf\util\ArrayUtil;
+
+/**
+ * MultiSelectOptionType is an implementation of IOptionType for multiple 'select' tags.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.option
+ * @category Community Framework
+ */
+class MultiSelectOptionType extends SelectOptionType {
+ /**
+ * @see wcf\system\option\IOptionType::getFormElement()
+ */
+ public function getFormElement(Option $option, $value) {
+ WCF::getTPL()->assign(array(
+ 'option' => $option,
+ 'selectOptions' => $option->parseSelectOptions(),
+ 'value' => explode("\n", $value)
+ ));
+ return WCF::getTPL()->fetch('multiSelectOptionType');
+ }
+
+ /**
+ * @see wcf\system\option\IOptionType::validate()
+ */
+ public function validate(Option $option, $newValue) {
+ if (!is_array($newValue)) $newValue = array();
+ $options = $option->parseSelectOptions();
+ foreach ($newValue as $value) {
+ if (!isset($options[$value])) {
+ throw new UserInputException($option->optionName, 'validationFailed');
+ }
+ }
+ }
+
+ /**
+ * @see wcf\system\option\IOptionType::getData()
+ */
+ public function getData(Option $option, $newValue) {
+ if (!is_array($newValue)) $newValue = array();
+ return implode("\n", $newValue);
+ }
+
+ /**
+ * @see wcf\system\option\ISearchableUserOption::getCondition()
+ */
+ public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {
+ if (!is_array($value) || !count($value)) return false;
+ $value = ArrayUtil::trim($value);
+ if (!count($value)) return false;
+
+ $conditions->add("option_value.userOption".$option->optionID." = ?", array(implode("\n", $value)));
+ return true;
+ }
+}
+++ /dev/null
-<?php
-namespace wcf\system\option;
-use wcf\data\option\Option;
-use wcf\system\database\util\PreparedStatementConditionBuilder;
-use wcf\system\exception\UserInputException;
-use wcf\system\WCF;
-use wcf\util\ArrayUtil;
-
-/**
- * MultiselectOptionType is an implementation of IOptionType for multiple 'select' tags.
- *
- * @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.option
- * @category Community Framework
- */
-class MultiselectOptionType extends SelectOptionType {
- /**
- * @see wcf\system\option\IOptionType::getFormElement()
- */
- public function getFormElement(Option $option, $value) {
- WCF::getTPL()->assign(array(
- 'option' => $option,
- 'selectOptions' => $option->parseSelectOptions(),
- 'value' => explode("\n", $value)
- ));
- return WCF::getTPL()->fetch('optionTypeMultiselect');
- }
-
- /**
- * @see wcf\system\option\IOptionType::validate()
- */
- public function validate(Option $option, $newValue) {
- if (!is_array($newValue)) $newValue = array();
- $options = $option->parseSelectOptions();
- foreach ($newValue as $value) {
- if (!isset($options[$value])) {
- throw new UserInputException($option->optionName, 'validationFailed');
- }
- }
- }
-
- /**
- * @see wcf\system\option\IOptionType::getData()
- */
- public function getData(Option $option, $newValue) {
- if (!is_array($newValue)) $newValue = array();
- return implode("\n", $newValue);
- }
-
- /**
- * @see wcf\system\option\ISearchableUserOption::getCondition()
- */
- public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {
- if (!is_array($value) || !count($value)) return false;
- $value = ArrayUtil::trim($value);
- if (!count($value)) return false;
-
- $conditions->add("option_value.userOption".$option->optionID." = ?", array(implode("\n", $value)));
- return true;
- }
-}
--- /dev/null
+<?php
+namespace wcf\system\option;
+use wcf\data\option\Option;
+use wcf\system\database\util\PreparedStatementConditionBuilder;
+use wcf\system\WCF;
+use wcf\system\UserInputException;
+use wcf\util\StringUtil;
+
+/**
+ * RadiobuttonsOptionType is an implementation of IOptionType for 'input type="radio"' tags.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.option
+ * @category Community Framework
+ */
+class RadioButtonOptionType extends AbstractOptionType implements ISearchableUserOption {
+ /**
+ * name of the template that contains the form element of this option type
+ * @var string
+ */
+ public $templateName = 'radioButtonOptionType';
+
+ /**
+ * @see wcf\system\option\IOptionType::getFormElement()
+ */
+ public function getFormElement(Option $option, $value) {
+ // get options
+ $selectOptions = $option->parseSelectOptions();
+
+ $availableOptions = $option->parseMultipleEnableOptions();
+ $options = array(
+ 'disableOptions' => array(),
+ 'enableOptions' => array()
+ );
+
+ foreach ($availableOptions as $key => $enableOptions) {
+ $optionData = Option::parseEnableOptions($enableOptions);
+
+ $options['disableOptions'][$key] = $optionData['disableOptions'];
+ $options['enableOptions'][$key] = $optionData['enableOptions'];
+ }
+
+ WCF::getTPL()->assign(array(
+ 'disableOptions' => $options['disableOptions'],
+ 'enableOptions' => $options['enableOptions'],
+ 'option' => $option,
+ 'selectOptions' => $selectOptions,
+ 'value' => $value
+ ));
+ return WCF::getTPL()->fetch($this->templateName);
+ }
+
+ /**
+ * @see wcf\system\option\IOptionType::validate()
+ */
+ public function validate(Option $option, $newValue) {
+ if (!empty($newValue)) {
+ $options = $option->parseSelectOptions();
+ if (!isset($options[$newValue])) {
+ throw new UserInputException($option->optionName, 'validationFailed');
+ }
+ }
+ }
+
+ /**
+ * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()
+ */
+ public function getSearchFormElement(Option $option, $value) {
+ return $this->getFormElement($optionData, $value);
+ }
+
+ /**
+ * @see wcf\system\option\ISearchableUserOption::getCondition()
+ */
+ public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {
+ $value = StringUtil::trim($value);
+ if (!$value) return false;
+
+ $conditions->add("option_value.userOption".$option->optionID." = ?", array($value));
+ return true;
+ }
+}
+++ /dev/null
-<?php
-namespace wcf\system\option;
-use wcf\data\option\Option;
-use wcf\system\database\util\PreparedStatementConditionBuilder;
-use wcf\system\WCF;
-use wcf\system\UserInputException;
-use wcf\util\StringUtil;
-
-/**
- * RadiobuttonsOptionType is an implementation of IOptionType for 'input type="radio"' tags.
- *
- * @author Marcel Werk
- * @copyright 2001-2011 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.option
- * @category Community Framework
- */
-class RadiobuttonsOptionType extends AbstractOptionType implements ISearchableUserOption {
- /**
- * name of the template that contains the form element of this option type
- * @var string
- */
- public $templateName = 'optionTypeRadiobuttons';
-
- /**
- * @see wcf\system\option\IOptionType::getFormElement()
- */
- public function getFormElement(Option $option, $value) {
- // get options
- $selectOptions = $option->parseSelectOptions();
-
- $availableOptions = $option->parseMultipleEnableOptions();
- $options = array(
- 'disableOptions' => array(),
- 'enableOptions' => array()
- );
-
- foreach ($availableOptions as $key => $enableOptions) {
- $optionData = Option::parseEnableOptions($enableOptions);
-
- $options['disableOptions'][$key] = $optionData['disableOptions'];
- $options['enableOptions'][$key] = $optionData['enableOptions'];
- }
-
- WCF::getTPL()->assign(array(
- 'disableOptions' => $options['disableOptions'],
- 'enableOptions' => $options['enableOptions'],
- 'option' => $option,
- 'selectOptions' => $selectOptions,
- 'value' => $value
- ));
- return WCF::getTPL()->fetch($this->templateName);
- }
-
- /**
- * @see wcf\system\option\IOptionType::validate()
- */
- public function validate(Option $option, $newValue) {
- if (!empty($newValue)) {
- $options = $option->parseSelectOptions();
- if (!isset($options[$newValue])) {
- throw new UserInputException($option->optionName, 'validationFailed');
- }
- }
- }
-
- /**
- * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()
- */
- public function getSearchFormElement(Option $option, $value) {
- return $this->getFormElement($optionData, $value);
- }
-
- /**
- * @see wcf\system\option\ISearchableUserOption::getCondition()
- */
- public function getCondition(PreparedStatementConditionBuilder &$conditions, Option $option, $value) {
- $value = StringUtil::trim($value);
- if (!$value) return false;
-
- $conditions->add("option_value.userOption".$option->optionID." = ?", array($value));
- return true;
- }
-}
'selectOptions' => $option->parseSelectOptions(),
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeSelect');
+ return WCF::getTPL()->fetch('selectOptionType');
}
/**
'inputType' => $this->inputType,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeTextI18n');
+ return WCF::getTPL()->fetch('textI18nOptionType');
}
/**
'inputClass' => $this->inputClass,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeText');
+ return WCF::getTPL()->fetch('textOptionType');
}
/**
'option' => $option,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeTextareaI18n');
+ return WCF::getTPL()->fetch('textareaI18nOptionType');
}
/**
'option' => $option,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeTextarea');
+ return WCF::getTPL()->fetch('textareaOptionType');
}
}
'selectOptions' => $timezoneOptions,
'value' => $value
));
- return WCF::getTPL()->fetch('optionTypeSelect');
+ return WCF::getTPL()->fetch('selectOptionType');
}
/**