Added options for change theme
This commit is contained in:
parent
12ea2a085a
commit
6f6ede7cc7
3 changed files with 14 additions and 4 deletions
|
|
@ -25,7 +25,9 @@ def ausers():
|
|||
|
||||
user_admin.fields['last_login'].name_form=HiddenForm
|
||||
|
||||
user_admin.create_forms(['username', 'password', 'email', 'privileges', 'lang', 'disabled', 'double_auth', 'last_login'])
|
||||
user_admin.fields['dark_theme'].name_form=SelectForm
|
||||
|
||||
user_admin.create_forms(['username', 'password', 'email', 'privileges', 'lang', 'dark_theme', 'disabled', 'double_auth', 'last_login'])
|
||||
|
||||
user_admin.forms['privileges'].arr_select={0: I18n.lang('admin', 'without_privileges', 'Without privileges'), 1: I18n.lang('admin', 'selected_privileges', 'Selected privileges'), 2: I18n.lang('admin', 'administrator', 'Administrator')}
|
||||
|
||||
|
|
@ -35,6 +37,8 @@ def ausers():
|
|||
|
||||
user_admin.fields['password'].protected=False
|
||||
|
||||
user_admin.forms['dark_theme'].arr_select={0: I18n.lang('admin', 'light_theme', 'Light theme'), 1: I18n.lang('admin', 'dark_theme', 'Dark theme')}
|
||||
|
||||
user_admin.check_user=False
|
||||
user_admin.check_email=False
|
||||
|
||||
|
|
@ -46,7 +50,7 @@ def ausers():
|
|||
|
||||
admin.list.search_fields=['username']
|
||||
|
||||
admin.arr_fields_edit=['username', 'password', 'repeat_password', 'email', 'lang', 'double_auth', 'disabled', 'last_login']
|
||||
admin.arr_fields_edit=['username', 'password', 'repeat_password', 'email', 'lang', 'dark_theme', 'double_auth', 'disabled', 'last_login']
|
||||
|
||||
form_admin=admin.show()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue