2022-11-26 02:33:46 +00:00
|
|
|
from django import forms
|
2023-05-04 04:42:37 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2022-11-26 02:33:46 +00:00
|
|
|
from django.utils.decorators import method_decorator
|
|
|
|
from django.views.generic import FormView
|
|
|
|
|
|
|
|
|
2023-05-04 04:42:37 +00:00
|
|
|
@method_decorator(login_required, name="dispatch")
|
2022-11-26 02:33:46 +00:00
|
|
|
class SecurityPage(FormView):
|
|
|
|
"""
|
|
|
|
Lets the identity's profile be edited
|
|
|
|
"""
|
|
|
|
|
|
|
|
template_name = "settings/login_security.html"
|
|
|
|
extra_context = {"section": "security"}
|
|
|
|
|
|
|
|
class form_class(forms.Form):
|
|
|
|
email = forms.EmailField(
|
|
|
|
disabled=True,
|
|
|
|
help_text="Your email address cannot be changed yet.",
|
|
|
|
)
|
|
|
|
|
|
|
|
def get_initial(self):
|
|
|
|
return {"email": self.request.user.email}
|
|
|
|
|
|
|
|
template_name = "settings/login_security.html"
|