aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-02 16:08:30 -0700
committerredmatrix <mike@macgirvin.com>2016-09-02 16:08:30 -0700
commit904881e20703c90c54dc4fc6049616b57bef3bb5 (patch)
treea6df77e7cef3cbe8dd9628b637538590374086b8
parentb00d0842439da9f88b4be690a5c382d5192631f0 (diff)
downloadvolse-hubzilla-904881e20703c90c54dc4fc6049616b57bef3bb5.tar.gz
volse-hubzilla-904881e20703c90c54dc4fc6049616b57bef3bb5.tar.bz2
volse-hubzilla-904881e20703c90c54dc4fc6049616b57bef3bb5.zip
pro: allow admin to set a site techlevel and optionally lock it.
-rw-r--r--Zotlabs/Module/Settings.php7
-rwxr-xr-xview/tpl/settings_account.tpl2
2 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php
index 4bbbd2e9b..364e067bd 100644
--- a/Zotlabs/Module/Settings.php
+++ b/Zotlabs/Module/Settings.php
@@ -803,6 +803,10 @@ class Settings extends \Zotlabs\Web\Controller {
'5' => t('Wizard - I probably know more than you do')
];
+ $def_techlevel = get_config('system','techlevel');
+ if($def_techlevel === false)
+ $def_techlevel = \App::$account['account_level'];
+ $techlock = get_config('system','techlevel_lock');
$tpl = get_markup_template("settings_account.tpl");
$o .= replace_macros($tpl, array(
@@ -811,7 +815,8 @@ class Settings extends \Zotlabs\Web\Controller {
'$origpass' => array('origpass', t('Current Password'), ' ',''),
'$password1'=> array('npassword', t('Enter New Password'), '', ''),
'$password2'=> array('confirm', t('Confirm New Password'), '', t('Leave password fields blank unless changing')),
- '$techlevel' => [ 'techlevel', t('Your technical skill level'), \App::$account['account_level'], t('Used to provide a member experience matched to your comfort level'), $techlevels ],
+ '$techlevel' => [ 'techlevel', t('Your technical skill level'), $def_techlevel, t('Used to provide a member experience matched to your comfort level'), $techlevels ],
+ '$techlock' => $techlock,
'$submit' => t('Submit'),
'$email' => array('email', t('Email Address:'), $email, ''),
'$removeme' => t('Remove Account'),
diff --git a/view/tpl/settings_account.tpl b/view/tpl/settings_account.tpl
index 4a94bb93d..8ff846518 100755
--- a/view/tpl/settings_account.tpl
+++ b/view/tpl/settings_account.tpl
@@ -12,7 +12,7 @@
{{include file="field_password.tpl" field=$password1}}
{{include file="field_password.tpl" field=$password2}}
- {{if $z_server_role == 'pro'}}
+ {{if $z_server_role == 'pro' && ! $techlock}}
{{include file="field_select.tpl" field=$techlevel}}
{{else}}
<input type="hidden" name="techlevel" value="{{$techlevel.2}}" />