mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/9388] Display only the settings for the selected search backend.
PHPBB3-9388
This commit is contained in:
parent
d95164e641
commit
e378037516
2 changed files with 8 additions and 6 deletions
|
@ -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>
|
||||
|
|
|
@ -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'))
|
||||
{
|
||||
|
@ -89,8 +90,9 @@ class acp_search
|
|||
{
|
||||
$template->assign_block_vars('backend', array(
|
||||
'NAME' => $name,
|
||||
'SETTINGS' => $vars['tpl'])
|
||||
);
|
||||
'SETTINGS' => $vars['tpl'],
|
||||
'IDENTIFIER' => $identifier,
|
||||
));
|
||||
}
|
||||
else if (is_array($vars['config']))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue