diff options
| author | 2019-11-20 18:21:39 +0100 | |
|---|---|---|
| committer | 2019-11-20 18:21:39 +0100 | |
| commit | b23edc0704618db7f17bd3438a1931c1e37cb16d (patch) | |
| tree | e3d8d59107aead98422180bdef75fad8069b0ffb /pydis_site/apps/home/forms | |
| parent | Test for the attachment image to be in the staff log (diff) | |
| parent | Update migration history (diff) | |
Merge branch 'bot#549-show-attachments-staff' of https://github.com/python-discord/site into bot#549-show-attachments-staff
Diffstat (limited to 'pydis_site/apps/home/forms')
| -rw-r--r-- | pydis_site/apps/home/forms/__init__.py | 0 | ||||
| -rw-r--r-- | pydis_site/apps/home/forms/account_deletion.py | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/pydis_site/apps/home/forms/__init__.py b/pydis_site/apps/home/forms/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/home/forms/__init__.py diff --git a/pydis_site/apps/home/forms/account_deletion.py b/pydis_site/apps/home/forms/account_deletion.py new file mode 100644 index 00000000..17ffe5c1 --- /dev/null +++ b/pydis_site/apps/home/forms/account_deletion.py @@ -0,0 +1,24 @@ +from crispy_forms.helper import FormHelper +from crispy_forms.layout import Layout +from django.forms import CharField, Form +from django_crispy_bulma.layout import IconField, Submit + + +class AccountDeletionForm(Form): + """Account deletion form, to collect username for confirmation of removal.""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.helper = FormHelper() + + self.helper.form_method = "post" + self.helper.add_input(Submit("submit", "I understand, delete my account")) + + self.helper.layout = Layout( + IconField("username", icon_prepend="user") + ) + + username = CharField( + label="Username", + required=True + ) |