diff --git a/accounts_app/forms.py b/accounts_app/forms.py index a29d771..f8fcc82 100644 --- a/accounts_app/forms.py +++ b/accounts_app/forms.py @@ -47,3 +47,9 @@ class UserPermissionsForm(forms.ModelForm): class Meta: model = UserProfile fields = 'user_permissions', + + +class UserProfileForm(forms.ModelForm): + class Meta: + model = UserProfile + exclude = ('avatar',) diff --git a/accounts_app/locale/ru/LC_MESSAGES/django.po b/accounts_app/locale/ru/LC_MESSAGES/django.po index f619350..3e62963 100644 --- a/accounts_app/locale/ru/LC_MESSAGES/django.po +++ b/accounts_app/locale/ru/LC_MESSAGES/django.po @@ -233,10 +233,6 @@ msgstr "Сбросить" msgid "User name" msgstr "Логин" -#: templates/accounts/index.html:17 templates/accounts/settings/ch_info.html:19 -msgid "Name and surname" -msgstr "Фамилия и Имя" - #: templates/accounts/index.html:21 msgid "Is enable" msgstr "Включён-ли" @@ -313,14 +309,6 @@ msgstr "Изменение прав доступа для выбранного msgid "The list of user groups to which the account has access" msgstr "Список групп абонентов, к которым учётка имеет доступ" -#: templates/accounts/settings/ch_info.html:48 -msgid "Old password" -msgstr "Старый пароль" - -#: templates/accounts/settings/ch_info.html:57 -msgid "New password" -msgstr "Новый пароль" - #: views.py:33 msgid "Wrong login or password, please try again" msgstr "Неправильный логин или пароль, попробуйте ещё раз" @@ -385,3 +373,6 @@ msgstr "Лог действий" msgid "Administrator" msgstr "Сотрудник" + +msgid "Saved successfully" +msgstr "Успешно сохранено" diff --git a/accounts_app/templates/accounts/settings/ch_info.html b/accounts_app/templates/accounts/settings/ch_info.html deleted file mode 100644 index b716525..0000000 --- a/accounts_app/templates/accounts/settings/ch_info.html +++ /dev/null @@ -1,75 +0,0 @@ -{% extends request.is_ajax|yesno:'nullcont.htm,accounts/settings/ext.htm' %} -{% load globaltags i18n %} -{% block content %} - -
- -{% endblock %} \ No newline at end of file diff --git a/accounts_app/templates/accounts/userprofile_form.html b/accounts_app/templates/accounts/userprofile_form.html new file mode 100644 index 0000000..b35e322 --- /dev/null +++ b/accounts_app/templates/accounts/userprofile_form.html @@ -0,0 +1,20 @@ +{% extends request.is_ajax|yesno:'nullcont.htm,accounts/settings/ext.htm' %} +{% load globaltags i18n bootstrap3 %} +{% block content %} + + + +{% endblock %} \ No newline at end of file diff --git a/accounts_app/urls.py b/accounts_app/urls.py index 6318a28..45f5687 100644 --- a/accounts_app/urls.py +++ b/accounts_app/urls.py @@ -15,7 +15,7 @@ urlpatterns = [ path('add/', views.create_profile, name='create_profile'), - path('settings/', views.ch_info, name='setup_info'), + path('settings/', views.UpdateSelfAccount.as_view(), name='setup_info'), path('settings/change_ava/', views.AvatarUpdateView.as_view(), name='setup_avatar'), path('