Removed obsolete option type
authorMarcel Werk <burntime@woltlab.com>
Wed, 16 Nov 2011 16:03:04 +0000 (17:03 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 16 Nov 2011 16:03:04 +0000 (17:03 +0100)
wcfsetup/install/files/acp/templates/optionTypeCustomselect.tpl [deleted file]
wcfsetup/install/files/lib/system/option/CustomselectOptionType.class.php [deleted file]

diff --git a/wcfsetup/install/files/acp/templates/optionTypeCustomselect.tpl b/wcfsetup/install/files/acp/templates/optionTypeCustomselect.tpl
deleted file mode 100644 (file)
index 5752a5a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<ul class="formOptionsLong">
-       {foreach from=$selectOptions key=key item=selectOption}
-               <li>
-                       <label><input type="radio" name="values[{$option->optionName}]"{if $value == $key} checked="checked"{/if} value="{$key}" /> {lang}{@$selectOption}{/lang}</label>
-               </li>
-       {/foreach}
-       <li>
-               <label><input type="radio" name="values[{$option->optionName}]"{if $value == $customValue} checked="checked"{/if} value="" /></label>
-               <input type="text" id="{$option->optionName}_custom" name="values[{$option->optionName}_custom]" value="{$customValue}" class="medium" />
-       </li>
-</ul>
\ No newline at end of file
diff --git a/wcfsetup/install/files/lib/system/option/CustomselectOptionType.class.php b/wcfsetup/install/files/lib/system/option/CustomselectOptionType.class.php
deleted file mode 100644 (file)
index 1b536ac..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace wcf\system\option;
-use wcf\data\option\Option;
-use wcf\system\WCF;
-
-/**
- * CustomselectOptionType is an implementation of IOptionType for 'select' tags with
- * a text field for custom inputs.
- *
- * @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 CustomselectOptionType extends SelectOptionType {
-       /**
-        * @see wcf\system\option\IOptionType::getFormElement()
-        */
-       public function getFormElement(Option $option, $value) {
-               WCF::getTPL()->assign(array(
-                       'option' => $option,
-                       'selectOptions' => $option->parseSelectOptions(),
-                       'value' => $value,
-                       'customValue' => (!isset($options[$value]) ? $value : '')
-               ));
-               
-               return WCF::getTPL()->fetch('optionTypeCustomselect');
-       }
-       
-       /**
-        * @see wcf\system\option\IOptionType::validate()
-        */
-       public function validate(Option $option, $newValue) {}
-       
-       /**
-        * @see wcf\system\option\IOptionType::getData()
-        */
-       public function getData(Option $option, $newValue) {
-               if (empty($newValue) && isset($_POST['values'][$option->optionName.'_custom'])) {
-                       return $_POST['values'][$option->optionName.'_custom'];
-               }
-               return $newValue;
-       }
-}