Skip to content

Commit

Permalink
Added action to ReCaptchaV3 as recommended.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahboyce committed Nov 29, 2023
1 parent fa4d947 commit a3c7c5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contact/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class BaseContactForm(ContactForm):
attrs={"class": "required", "placeholder": "Your message"}
)
)
captcha = ReCaptchaField(widget=ReCaptchaV3)
captcha = ReCaptchaField(widget=ReCaptchaV3(action="contact_form"))

def subject(self):
# Strip all linebreaks from the subject string.
Expand Down
4 changes: 2 additions & 2 deletions fundraising/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class DonateForm(forms.Form):

amount = forms.ChoiceField(choices=AMOUNT_CHOICES)
interval = forms.ChoiceField(choices=INTERVAL_CHOICES)
captcha = ReCaptchaField(widget=ReCaptchaV3)
captcha = ReCaptchaField(widget=ReCaptchaV3(action="donate_form"))


class DonationForm(forms.ModelForm):
Expand Down Expand Up @@ -176,7 +176,7 @@ class PaymentForm(forms.Form):
`amount` can be any integer, so a ChoiceField is not appropriate.
"""

captcha = ReCaptchaField(widget=ReCaptchaV3)
captcha = ReCaptchaField(widget=ReCaptchaV3(action="payment_form"))
amount = forms.IntegerField(
required=True,
min_value=1, # Minimum payment from Stripe API
Expand Down

0 comments on commit a3c7c5b

Please sign in to comment.