diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/input/access.php | 16 | ||||
-rw-r--r-- | views/default/settings/system.php | 29 |
2 files changed, 26 insertions, 19 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php index db938111e..e08eca13a 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -15,15 +15,19 @@ * @uses $vars['js'] Any Javascript to enter into the input tag
* @uses $vars['internalname'] The name of the input field
*
- */ - - if (isset($vars['class'])) $class = $vars['class']; + */
+
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "input-access";
- - if ((!isset($vars['options'])) || (!is_array($vars['options']))) +
+ if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
+ $vars['value'] = get_default_access();
+
+
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
{
$vars['options'] = array();
- $vars['options'] = get_write_access_array(); + $vars['options'] = get_write_access_array();
}
if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
diff --git a/views/default/settings/system.php b/views/default/settings/system.php index f8317d95c..317a1094e 100644 --- a/views/default/settings/system.php +++ b/views/default/settings/system.php @@ -35,26 +35,29 @@ $languages = get_installed_translations();
$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>"; - - $form_body .= "<p class=\"admin_debug\">" . 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 class=\"admin_debug\">" . elgg_echo('admin:site:access:warning') . "<br />";
+ $form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
- - $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />"; - $on = elgg_echo('installation:disableapi:label'); - if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) - $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label')); - $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on )); - $form_body .= "</p>"; + $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . 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 class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
+ $on = elgg_echo('installation:disableapi:label');
+ if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
+ $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
+ $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
+ $form_body .= "</p>";
$form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
- $on = elgg_echo('installation:usage:label'); + $on = elgg_echo('installation:usage:label');
if (isset($CONFIG->ping_home))
$on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
- $form_body .= "</p>"; - + $form_body .= "</p>";
+
$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
|