supporters: Default to "monthly" Sustainer

Also remove unused `template_name` property on `SustainerForm`. That template
didn't exist.
This commit is contained in:
Ben Sturmfels 2024-12-21 11:29:22 +11:00
parent 7c47a85c5b
commit bdd883490f
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -46,8 +46,6 @@ class SustainerForm(forms.ModelForm):
# To pre-fill the price option buttons in the case of server-side validation errors.
amount_option = forms.CharField(required=False)
template_name = 'supporters/sustainer_form.html'
MONTH_OPTIONS = [12, 23, 45, 87]
YEAR_OPTIONS = [128, 256, 512, 1024]
MONTH_MINIMUM = 10
@ -95,6 +93,7 @@ class SustainerForm(forms.ModelForm):
self.renderer = SustainerFormRenderer()
self.fields['recurring'].label = ''
self.fields['recurring'].initial = 'month'
self.fields['amount'].initial = self.YEAR_OPTIONS[0]
self.fields['tshirt_size'].widget.attrs['x-model'] = 'tshirt_size'