From: Matthias Schmidt Date: Fri, 9 May 2014 13:21:07 +0000 (+0200) Subject: Add improved search implementation to TextareaOptionType X-Git-Tag: 2.1.0_Alpha_1~838 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a2cc4b0322d019d5ec9592aa4cce13272479070;p=GitHub%2FWoltLab%2FWCF.git Add improved search implementation to TextareaOptionType --- diff --git a/com.woltlab.wcf/templates/textareaSearchableOptionType.tpl b/com.woltlab.wcf/templates/textareaSearchableOptionType.tpl new file mode 100644 index 0000000000..7d22daa2d6 --- /dev/null +++ b/com.woltlab.wcf/templates/textareaSearchableOptionType.tpl @@ -0,0 +1,17 @@ + + + + diff --git a/wcfsetup/install/files/acp/templates/textareaSearchableOptionType.tpl b/wcfsetup/install/files/acp/templates/textareaSearchableOptionType.tpl new file mode 100644 index 0000000000..7d22daa2d6 --- /dev/null +++ b/wcfsetup/install/files/acp/templates/textareaSearchableOptionType.tpl @@ -0,0 +1,17 @@ + + + + diff --git a/wcfsetup/install/files/lib/system/option/TextareaOptionType.class.php b/wcfsetup/install/files/lib/system/option/TextareaOptionType.class.php index bdbf4775fa..93170da866 100644 --- a/wcfsetup/install/files/lib/system/option/TextareaOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/TextareaOptionType.class.php @@ -26,6 +26,18 @@ class TextareaOptionType extends TextOptionType { return WCF::getTPL()->fetch('textareaOptionType'); } + /** + * @see \wcf\system\option\ISearchableUserOption::getSearchFormElement() + */ + public function getSearchFormElement(Option $option, $value) { + WCF::getTPL()->assign(array( + 'option' => $option, + 'searchOption' => isset($_POST['searchOptions'][$option->optionName]), + 'value' => $value + )); + return WCF::getTPL()->fetch('textareaSearchableOptionType'); + } + /** * @see \wcf\system\option\IOptionType::getData() */