diff --git a/dmoj/settings.py b/dmoj/settings.py index 7a42b06..8e3b27e 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -514,9 +514,6 @@ NEWSLETTER_BATCH_DELAY = 60 # Number of emails in one batch NEWSLETTER_BATCH_SIZE = 100 -# Google form to request name -REGISTER_NAME_URL = None - try: with open(os.path.join(os.path.dirname(__file__), "local_settings.py")) as f: exec(f.read(), globals()) diff --git a/judge/forms.py b/judge/forms.py index 402a040..04e452e 100644 --- a/judge/forms.py +++ b/judge/forms.py @@ -52,6 +52,7 @@ def fix_unicode(string, unsafe=tuple("\u202a\u202b\u202d\u202e")): string + (sum(k in unsafe for k in string) - string.count("\u202c")) * "\u202c" ) + class UserForm(ModelForm): class Meta: model = User @@ -59,6 +60,7 @@ class UserForm(ModelForm): "first_name", ] + class ProfileForm(ModelForm): if newsletter_id is not None: newsletter = forms.BooleanField( diff --git a/judge/views/user.py b/judge/views/user.py index e65bdbd..8042366 100644 --- a/judge/views/user.py +++ b/judge/views/user.py @@ -441,10 +441,10 @@ def edit_profile(request): print(settings.REGISTER_NAME_URL) return render( request, - "user/edit-profile.html", + "user/edit-profile.html", { - "edit_name_url": settings.REGISTER_NAME_URL, - "require_staff_2fa": settings.DMOJ_REQUIRE_STAFF_2FA, 'form_user': form_user, + "require_staff_2fa": settings.DMOJ_REQUIRE_STAFF_2FA, + "form_user": form_user, "form": form, "title": _("Edit profile"), "profile": profile, diff --git a/templates/user/edit-profile.html b/templates/user/edit-profile.html index 2155258..3c36041 100644 --- a/templates/user/edit-profile.html +++ b/templates/user/edit-profile.html @@ -94,16 +94,6 @@ {% csrf_token %} - {% if edit_name_url %} -
- - - {{_('Enter this form')}} - ({{_('It takes some time for admin to approve')}}) - -
- {% endif %} -
{{ _('Fullname') }}:
{{ form_user.first_name }}