From 184348e4363291966b2d8ca51042a137f22893a4 Mon Sep 17 00:00:00 2001 From: jmath1 Date: Thu, 11 Jun 2020 11:45:50 -0400 Subject: [PATCH] add use_required_attribute=False to prevent required attribute from being added to html (maintaining original behavior) --- apps/profile/forms.py | 2 ++ apps/reader/forms.py | 4 ++++ vendor/zebra/forms.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/apps/profile/forms.py b/apps/profile/forms.py index 379829751..472e2bb60 100644 --- a/apps/profile/forms.py +++ b/apps/profile/forms.py @@ -94,6 +94,7 @@ class ForgotPasswordReturnForm(forms.Form): required=False) class AccountSettingsForm(forms.Form): + use_required_attribute = False username = forms.RegexField(regex=r'^\w+$', max_length=30, widget=forms.TextInput(attrs={'class': 'NB-input'}), @@ -192,6 +193,7 @@ class AccountSettingsForm(forms.Form): MCustomStyling.save_user(self.user.pk, custom_css, custom_js) class RedeemCodeForm(forms.Form): + use_required_attribute = False gift_code = forms.CharField(widget=forms.TextInput(), label="Gift code", required=True) diff --git a/apps/reader/forms.py b/apps/reader/forms.py index 01e0965ed..59ac972fb 100644 --- a/apps/reader/forms.py +++ b/apps/reader/forms.py @@ -76,6 +76,8 @@ class LoginForm(forms.Form): class SignupForm(forms.Form): + use_required_attribute = False + username = forms.RegexField(regex=r'^\w+$', max_length=30, widget=forms.TextInput(attrs={'class': 'NB-input'}), @@ -172,6 +174,8 @@ class SignupForm(forms.Form): return new_user class FeatureForm(forms.Form): + use_required_attribute = False + description = forms.CharField(required=True) def save(self): diff --git a/vendor/zebra/forms.py b/vendor/zebra/forms.py index 004132053..b85853bec 100755 --- a/vendor/zebra/forms.py +++ b/vendor/zebra/forms.py @@ -12,6 +12,8 @@ class MonospaceForm(forms.Form): class CardForm(MonospaceForm): + use_required_attribute = False + last_4_digits = forms.CharField(required=True, min_length=4, max_length=4, widget=forms.HiddenInput()) stripe_token = forms.CharField(required=True, widget=forms.HiddenInput())