aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/account/forms/login.php4
-rw-r--r--views/default/account/forms/login_dropdown.php7
-rw-r--r--views/default/admin/site/advanced.php8
3 files changed, 11 insertions, 8 deletions
diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php
index ec6e61cfc..baea51770 100644
--- a/views/default/account/forms/login.php
+++ b/views/default/account/forms/login.php
@@ -8,8 +8,6 @@
* @link http://elgg.org/
*/
-global $CONFIG;
-
$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea')) . "</label>";
$form_body .= "<br />";
$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')) . "</label><br />";
@@ -19,7 +17,7 @@ $form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));
$form_body .= "<div class='persistent_login'><label><input type='checkbox' name='persistent' value='true' />".elgg_echo('user:persistent')."</label></div>";
$form_body .= "<p class='loginbox'>";
-$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . "</a> | " : "";
+$form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . '</a> | ' : '';
$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
$login_url = $vars['url'];
diff --git a/views/default/account/forms/login_dropdown.php b/views/default/account/forms/login_dropdown.php
index 352e32e60..16f7ee78b 100644
--- a/views/default/account/forms/login_dropdown.php
+++ b/views/default/account/forms/login_dropdown.php
@@ -4,10 +4,7 @@
*
*/
-if (!isloggedin()){
-
- global $CONFIG;
-
+if (!isloggedin()) {
$form_body = "<p class='loginbox'><label>" . elgg_echo('username') . "</label>" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea name'));
$form_body .= "<label>" . elgg_echo('password') . "</label>" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea'));
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <span class='remember'><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></span></p>";
@@ -15,7 +12,7 @@ if (!isloggedin()){
$form_body .= elgg_view('login/extend');
$form_body .= "<p class='loginbox'>";
- $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
+ $form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . '</a> | ' : '';
$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
$form_body .= "<input type='hidden' name='returntoreferer' value='true' />";
diff --git a/views/default/admin/site/advanced.php b/views/default/admin/site/advanced.php
index da7b98a1a..e8c6e9b9a 100644
--- a/views/default/admin/site/advanced.php
+++ b/views/default/admin/site/advanced.php
@@ -33,6 +33,14 @@ $form_body .= "<p>" . elgg_echo('installation:debug');
$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug));
$form_body .= '</p>';
+$options = array(
+ 'options' => array(elgg_echo('installation:registration:label')),
+ 'internalname' => 'allow_registration',
+ 'value' => $vars['config']->allow_registration ? elgg_echo('installation:registration:label') : '',
+);
+$form_body .= '<p>' . elgg_echo('installation:registration:description');
+$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</p>';
+
$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
$form_body .= "<p>" . elgg_echo('installation:disableapi') . "<br />";