aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-11 10:48:10 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-11 10:48:10 +0200
commit6cd7abe2557336a88db0220603c83743f1291642 (patch)
tree7c9e18e9ab43653e166739b9392c2f8234ade889 /phpBB/includes/acp
parent9aee2ed03995aca1d0348681bcb68d0042801d3a (diff)
parente233f0af3615070a003a49bf055ae9fa582cc899 (diff)
downloadforums-6cd7abe2557336a88db0220603c83743f1291642.tar
forums-6cd7abe2557336a88db0220603c83743f1291642.tar.gz
forums-6cd7abe2557336a88db0220603c83743f1291642.tar.bz2
forums-6cd7abe2557336a88db0220603c83743f1291642.tar.xz
forums-6cd7abe2557336a88db0220603c83743f1291642.zip
Merge pull request #2420 from prototech/ticket/9388
[ticket/9388] Only display the settings for the selected method in the auth and search ACP pages. * prototech/ticket/9388: [ticket/9388] Use "togglable" instead of "toggable" [ticket/9388] Do not nest the <fieldset> tags in the OAuth settings. [ticket/9388] Reopen <fieldset> after auth templates. [ticket/9388] Fix unit tests. [ticket/9388] Use the new toggle function for the avatar type <select>. [ticket/9388] Display only the settings for the selected search backend. [ticket/9388] Display only the settings for the auth method that's selected. [ticket/9388] Add support for making <select> options able to toggle settings.
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_board.php4
-rw-r--r--phpBB/includes/acp/acp_search.php10
2 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index cf0f23a16e..f054e82de3 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -363,7 +363,7 @@ class acp_board
'title' => 'ACP_AUTH_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AUTH_SETTINGS',
- 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false),
+ 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select:1:toggable', 'method' => 'select_auth_method', 'explain' => false),
)
);
break;
@@ -715,7 +715,7 @@ class acp_board
foreach ($auth_plugins as $method)
{
$selected = ($selected_method == $method) ? ' selected="selected"' : '';
- $auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
+ $auth_select .= "<option value=\"$method\"$selected data-toggle-setting=\"#auth_{$method}_settings\">" . ucfirst($method) . '</option>';
}
return $auth_select;
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']))
{