diff options
-rw-r--r-- | mod/settings.php | 42 | ||||
-rw-r--r-- | view/theme/duepuntozero/css/style.css | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/mod/settings.php b/mod/settings.php index 5a29dfd0c..a78f25015 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -39,6 +39,12 @@ function settings_init(&$a) { ), array( + 'label' => t('Additional features'), + 'url' => $a->get_baseurl(true).'/settings/features', + 'selected' => ((argv(1) === 'features') ? 'active' : ''), + ), + + array( 'label' => t('Display settings'), 'url' => $a->get_baseurl(true).'/settings/display', 'selected' => ((argv(1) === 'display') ? 'active' : ''), @@ -163,6 +169,18 @@ function settings_post(&$a) { return; } + + + if((argc() > 1) && (argv(1) === 'features')) { + check_form_security_token_redirectOnErr('/settings/features', 'settings_features'); + foreach($_POST as $k => $v) { + if(strpos($k,'feature_') === 0) { + set_pconfig(local_user(),'feature',substr($k,8),((intval($v)) ? 1 : 0)); + } + } + return; + } + if((argc() > 1) && (argv(1) == 'connectors')) { check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors'); @@ -591,6 +609,30 @@ function settings_content(&$a) { return $o; } + + if((argc() > 1) && (argv(1) === 'features')) { + + $arr = array(); + $features = get_features(); + foreach($features as $f) { + $arr[] = array('feature_' .$f[0],$f[1],((intval(get_pconfig(local_user(),'feature',$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On'))); + } + + + $tpl = get_markup_template("settings_features.tpl"); + $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_features"), + '$title' => t('Additional Features'), + '$features' => $arr, + '$submit' => t('Submit') + )); + return $o; + } + + + + + if((argc() > 1) && (argv(1) === 'connectors')) { $settings_connectors = ""; diff --git a/view/theme/duepuntozero/css/style.css b/view/theme/duepuntozero/css/style.css index 4c9d10edd..40941c890 100644 --- a/view/theme/duepuntozero/css/style.css +++ b/view/theme/duepuntozero/css/style.css @@ -3077,6 +3077,7 @@ aside input[type='text'] { .field .onoff { float: left; width: 80px; + margin-right: 15px; } .field .onoff a { display: block; |