mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Add profile form in matmat
This commit is contained in:
@ -118,6 +118,22 @@ class UserMatmatToolsView(QuickNotifMixin, TemplateView):
|
||||
kwargs['subscribe_form'] = UserMatmatForm()
|
||||
return kwargs
|
||||
|
||||
class UserMatmatEditProfileView(UpdateView):
|
||||
model = User
|
||||
form_class = modelform_factory(User,
|
||||
fields=['second_email', 'phone', 'department', 'dpt_option',
|
||||
'quote', 'parent_address'],
|
||||
labels={
|
||||
'second_email': _("Personal email (not UTBM)"),
|
||||
'phone': _("Phone"),
|
||||
'parent_address': _("Native town"),
|
||||
})
|
||||
template_name = "core/edit.jinja"
|
||||
success_url = reverse_lazy('matmat:user_tools')
|
||||
|
||||
def get_object(self):
|
||||
return self.request.user
|
||||
|
||||
class MatmatCommentFormView():
|
||||
"""
|
||||
Create/edit a matmat comment
|
||||
|
Reference in New Issue
Block a user