mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 07:07:51 +02:00
[ticket/9388] Display only the settings for the selected search backend.
PHPBB3-9388
This commit is contained in:
parent
d95164e641
commit
e378037516
@ -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'))
|
||||
{
|
||||
@ -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']))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user