aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-10-03 17:16:24 -0700
committerredmatrix <mike@macgirvin.com>2016-10-03 17:16:24 -0700
commitcef1aa6d1b21b15458783661ed4c7e6fe8a99011 (patch)
treed1347dc658e7d71ad44abd4fdb691a31e219c364 /Zotlabs/Module/Admin
parent5b10db6f91f4bb876bbadbc9602c68762a3c9b71 (diff)
downloadvolse-hubzilla-cef1aa6d1b21b15458783661ed4c7e6fe8a99011.tar.gz
volse-hubzilla-cef1aa6d1b21b15458783661ed4c7e6fe8a99011.tar.bz2
volse-hubzilla-cef1aa6d1b21b15458783661ed4c7e6fe8a99011.zip
add some more stuff to admin/account_edit (service class, language, and techlevel if appropriate). Fix en-au and en-gb so they are listed as languages, and move language selector stuff to include/language.php instead of include/text.php; new file Zotlabs/Lib/Techlevels.php so we only need to write the selection array once.
Diffstat (limited to 'Zotlabs/Module/Admin')
-rw-r--r--Zotlabs/Module/Admin/Account_edit.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/Zotlabs/Module/Admin/Account_edit.php b/Zotlabs/Module/Admin/Account_edit.php
index ddb7e19f4..6dfadf183 100644
--- a/Zotlabs/Module/Admin/Account_edit.php
+++ b/Zotlabs/Module/Admin/Account_edit.php
@@ -29,6 +29,22 @@ class Account_edit {
info( sprintf( t('Password changed for account %d.'), $account_id). EOL);
}
+
+ $service_class = trim($_REQUEST['service_class']);
+ $account_level = intval(trim($_REQUEST['account_level']));
+ $account_language = trim($_REQUEST['account_language']);
+
+ $r = q("update account set account_service_class = '%s', account_level = %d, account_language = '%s'
+ where account_id = %d",
+ dbesc($service_class),
+ intval($account_level),
+ dbesc($account_language),
+ intval($account_id)
+ );
+
+ if($r)
+ info( t('Account settings updated.') . EOL);
+
goaway(z_root() . '/admin/accounts');
}
@@ -46,11 +62,15 @@ class Account_edit {
return '';
}
+
$a = replace_macros(get_markup_template('admin_account_edit.tpl'), [
'$account' => $x[0],
'$title' => t('Account Edit'),
'$pass1' => [ 'pass1', t('New Password'), ' ','' ],
'$pass2' => [ 'pass2', t('New Password again'), ' ','' ],
+ '$account_level' => [ 'account_level', t('Technical skill level'), $x[0]['account_level'], '', \Zotlabs\Lib\Techlevels::levels() ],
+ '$account_language' => [ 'account_language' , t('Account language (for emails)'), $x[0]['account_language'], '', language_list() ],
+ '$service_class' => [ 'service_class', t('Service class'), $x[0]['account_service_class'], '' ],
'$submit' => t('Submit'),
]
);