From d95164e64155ea3bdbca69532af5dd49c093b351 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 6 May 2014 17:52:12 -0700 Subject: [PATCH] [ticket/9388] Display only the settings for the auth method that's selected. PHPBB3-9388 --- phpBB/adm/style/acp_board.html | 1 + phpBB/adm/style/auth_provider_ldap.html | 67 +++++++++++++----------- phpBB/adm/style/auth_provider_oauth.html | 30 ++++++----- phpBB/includes/acp/acp_board.php | 4 +- phpBB/language/en/acp/board.php | 1 + 5 files changed, 55 insertions(+), 48 deletions(-) diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html index 1a09c4eee6..4cc0c9a9c3 100644 --- a/phpBB/adm/style/acp_board.html +++ b/phpBB/adm/style/acp_board.html @@ -33,6 +33,7 @@ + diff --git a/phpBB/adm/style/auth_provider_ldap.html b/phpBB/adm/style/auth_provider_ldap.html index 81afa44373..9e0567dfed 100644 --- a/phpBB/adm/style/auth_provider_ldap.html +++ b/phpBB/adm/style/auth_provider_ldap.html @@ -1,32 +1,35 @@ -
-

{L_LDAP_SERVER_EXPLAIN}
-
-
-
-

{L_LDAP_PORT_EXPLAIN}
-
-
-
-

{L_LDAP_DN_EXPLAIN}
-
-
-
-

{L_LDAP_UID_EXPLAIN}
-
-
-
-

{L_LDAP_USER_FILTER_EXPLAIN}
-
-
-
-

{L_LDAP_EMAIL_EXPLAIN}
-
-
-
-

{L_LDAP_USER_EXPLAIN}
-
-
-
-

{L_LDAP_PASSWORD_EXPLAIN}
-
-
+
+ {L_LDAP} +
+

{L_LDAP_SERVER_EXPLAIN}
+
+
+
+

{L_LDAP_PORT_EXPLAIN}
+
+
+
+

{L_LDAP_DN_EXPLAIN}
+
+
+
+

{L_LDAP_UID_EXPLAIN}
+
+
+
+

{L_LDAP_USER_FILTER_EXPLAIN}
+
+
+
+

{L_LDAP_EMAIL_EXPLAIN}
+
+
+
+

{L_LDAP_USER_EXPLAIN}
+
+
+
+

{L_LDAP_PASSWORD_EXPLAIN}
+
+
+
diff --git a/phpBB/adm/style/auth_provider_oauth.html b/phpBB/adm/style/auth_provider_oauth.html index 25e40ff596..3e994ec721 100644 --- a/phpBB/adm/style/auth_provider_oauth.html +++ b/phpBB/adm/style/auth_provider_oauth.html @@ -1,17 +1,19 @@ -

{L_AUTH_PROVIDER_OAUTH_TITLE}

+
+ {L_AUTH_PROVIDER_OAUTH_TITLE} -

{L_AUTH_PROVIDER_OAUTH_EXPLAIN}

+

{L_AUTH_PROVIDER_OAUTH_EXPLAIN}

- -
- {oauth_services.ACTUAL_NAME} -
-
-
-
-
-
-
-
+ +
+ {oauth_services.ACTUAL_NAME} +
+
+
+
+
+
+
+
+
+
- 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 .= ''; + $auth_select .= "'; } return $auth_select; diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 505709d513..b796206261 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -406,6 +406,7 @@ $lang = array_merge($lang, array( 'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.', + 'LDAP' => 'LDAP', 'LDAP_DN' => 'LDAP base dn', 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US.', 'LDAP_EMAIL' => 'LDAP email attribute',