GUI to edit API hash on user
This commit is contained in:
parent
32303299f7
commit
2e2e2e109e
|
@ -89,6 +89,7 @@ $sm_lang = array(
|
|||
'user_name' => 'Uživatelské jméno',
|
||||
'password' => 'Heslo',
|
||||
'password_repeat' => 'Stejné heslo (pro kontrolu)',
|
||||
'api_hash' => 'API hash',
|
||||
'password_leave_blank' => 'Ponechte prázdné pro ponechání beze změn.',
|
||||
'level' => 'Oprávnění',
|
||||
'level_10' => 'Administrátor',
|
||||
|
|
|
@ -95,6 +95,7 @@ $sm_lang = array(
|
|||
'user_name' => 'Username',
|
||||
'password' => 'Password',
|
||||
'password_repeat' => 'Password repeat',
|
||||
'api_hash' => 'API hash',
|
||||
'password_leave_blank' => 'Leave blank to keep unchanged',
|
||||
'level' => 'Level',
|
||||
'level_10' => 'Administrator',
|
||||
|
|
|
@ -139,7 +139,7 @@ class UserController extends AbstractController {
|
|||
*/
|
||||
protected function executeEdit() {
|
||||
$user_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
|
||||
$fields_prefill = array('name', 'user_name', 'mobile', 'pushover_key', 'pushover_device', 'telegram_id', 'email');
|
||||
$fields_prefill = array('name', 'user_name', 'mobile', 'pushover_key', 'pushover_device', 'telegram_id', 'email', 'api_hash');
|
||||
|
||||
if ($user_id == 0) {
|
||||
// insert mode
|
||||
|
@ -223,7 +223,7 @@ class UserController extends AbstractController {
|
|||
}
|
||||
$user_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
|
||||
|
||||
$fields = array('name', 'user_name', 'password', 'password_repeat', 'level', 'mobile', 'pushover_key', 'pushover_device', 'telegram_id', 'email');
|
||||
$fields = array('name', 'user_name', 'password', 'password_repeat', 'level', 'mobile', 'pushover_key', 'pushover_device', 'telegram_id', 'email', 'api_hash');
|
||||
$clean = array();
|
||||
foreach ($fields as $field) {
|
||||
if (isset($_POST[$field])) {
|
||||
|
@ -342,6 +342,7 @@ class UserController extends AbstractController {
|
|||
'label_user_name' => psm_get_lang('users', 'user_name'),
|
||||
'label_password' => psm_get_lang('users', 'password'),
|
||||
'label_password_repeat' => psm_get_lang('users', 'password_repeat'),
|
||||
'label_api_hash' => psm_get_lang('users', 'api_hash'),
|
||||
'label_level' => psm_get_lang('users', 'level'),
|
||||
'label_level_description' => psm_get_lang('users', 'level_description'),
|
||||
'label_mobile' => psm_get_lang('users', 'mobile'),
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
{{ macro.input_field("password", "password", null, "password", label_password, edit_value_password, placeholder_password, "255") }}
|
||||
<!-- Password repeat -->
|
||||
{{ macro.input_field("password", "password_repeat", null, "password_repeat", label_password_repeat, edit_value_password_repeat, placeholder_password, "255") }}
|
||||
<!-- API authentication hash -->
|
||||
{{ macro.input_field("text", "api_hash", null, "api_hash", label_api_hash, edit_value_api_hash, placeholder_api_hash, "255") }}
|
||||
<!-- Email -->
|
||||
{{ macro.input_field("email", "email", null, "email", label_email, edit_value_email, null, "255") }}
|
||||
<!-- Mobile -->
|
||||
|
|
Loading…
Reference in New Issue