MCPcopy Create free account
hub / github.com/developerfromjokela/opencarwings / SignUpForm

Class SignUpForm

ui/forms.py:51–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50 def full_clean(self):
51 super().full_clean()
52 new_pin = self.data.get('new_pin')
53 new_pin_confirm = self.data.get('new_pin_confirm')
54
55 if new_pin or new_pin_confirm:
56 if new_pin != new_pin_confirm:
57 self.add_error('new_pin_confirm', _('PIN codes do not match.'))
58
59class AccountForm(forms.Form):
60 email = forms.EmailField(label=_("Email"), widget=forms.EmailInput(), max_length=254)
61 notifications = forms.BooleanField(label=_("Notifications"), widget=forms.CheckboxInput(), required=False)
62 units_imperial = forms.BooleanField(label=_("Imperial Units"), widget=forms.CheckboxInput(), required=False)
63 timezone = forms.ChoiceField(label=_("Timezone"), choices=TIMEZONE_CHOICES, required=False)
64
65class ProbeConfigForm(forms.Form):
66 new_config_id = forms.IntegerField(label="New Config ID", required=False)
67 request = forms.CharField(widget=forms.HiddenInput(), required=True)
68
69
70class SignUpForm(UserCreationForm):
71 email = forms.EmailField(widget=forms.EmailInput(), max_length=254)
72 timezone = forms.CharField(
73 required=False,
74 max_length=32,

Callers 1

signupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected