diff options
author | Cesar G <prototech91@gmail.com> | 2014-05-06 17:57:33 -0700 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-05-08 08:35:38 -0700 |
commit | e378037516903ed612c88e8ad0138ec956077b58 (patch) | |
tree | 01bb1eab4342cef0051ac59fae264aa8a908fa86 /phpBB | |
parent | d95164e64155ea3bdbca69532af5dd49c093b351 (diff) | |
download | forums-e378037516903ed612c88e8ad0138ec956077b58.tar forums-e378037516903ed612c88e8ad0138ec956077b58.tar.gz forums-e378037516903ed612c88e8ad0138ec956077b58.tar.bz2 forums-e378037516903ed612c88e8ad0138ec956077b58.tar.xz forums-e378037516903ed612c88e8ad0138ec956077b58.zip |
[ticket/9388] Display only the settings for the selected search backend.
PHPBB3-9388
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/acp_search.html | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_search.php | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index 496a8b2675..dd63eac7d5 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -46,13 +46,13 @@ <legend>{L_SEARCH_TYPE}</legend> <dl> <dt><label for="search_type">{L_SEARCH_TYPE}{L_COLON}</label><br /><span>{L_SEARCH_TYPE_EXPLAIN}</span></dt> - <dd><select id="search_type" name="config[search_type]">{S_SEARCH_TYPES}</select></dd> + <dd><select id="search_type" name="config[search_type]" data-toggable-settings="true">{S_SEARCH_TYPES}</select></dd> </dl> </fieldset> <!-- BEGIN backend --> - <fieldset> + <fieldset id="search_{backend.IDENTIFIER}_settings"> <legend>{backend.NAME}</legend> {backend.SETTINGS} </fieldset> diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 11a2511aee..ce1e4afa9b 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -79,7 +79,8 @@ class acp_search $name = $search->get_name(); $selected = ($config['search_type'] == $type) ? ' selected="selected"' : ''; - $search_options .= '<option value="' . $type . '"' . $selected . '>' . $name . '</option>'; + $identifier = substr($type, strrpos($type, '\\') + 1); + $search_options .= "<option value=\"$type\"$selected data-toggle-setting=\"#search_{$identifier}_settings\">$name</option>"; if (method_exists($search, 'acp')) { @@ -88,9 +89,10 @@ class acp_search if (!$submit) { $template->assign_block_vars('backend', array( - 'NAME' => $name, - 'SETTINGS' => $vars['tpl']) - ); + 'NAME' => $name, + 'SETTINGS' => $vars['tpl'], + 'IDENTIFIER' => $identifier, + )); } else if (is_array($vars['config'])) { |