mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-10 06:24:45 +02:00
Autoformat with black linter
This commit is contained in:
parent
d4b888d9a1
commit
aad03f9bf4
1 changed files with 104 additions and 30 deletions
|
@ -11,11 +11,13 @@ from formtools.wizard.views import NamedUrlSessionWizardView # type: ignore
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class RegistrarForm(forms.Form):
|
class RegistrarForm(forms.Form):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
kwargs.setdefault('label_suffix', '')
|
kwargs.setdefault("label_suffix", "")
|
||||||
super(RegistrarForm, self).__init__(*args, **kwargs)
|
super(RegistrarForm, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class OrganizationForm(RegistrarForm):
|
class OrganizationForm(RegistrarForm):
|
||||||
organization_type = forms.ChoiceField(
|
organization_type = forms.ChoiceField(
|
||||||
required=True,
|
required=True,
|
||||||
|
@ -61,9 +63,10 @@ class OrganizationForm(RegistrarForm):
|
||||||
("Yes", "Yes"),
|
("Yes", "Yes"),
|
||||||
("No", "No"),
|
("No", "No"),
|
||||||
],
|
],
|
||||||
widget=forms.RadioSelect(attrs={"class":"usa-radio__input"}),
|
widget=forms.RadioSelect(attrs={"class": "usa-radio__input"}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OrganizationFederalForm(RegistrarForm):
|
class OrganizationFederalForm(RegistrarForm):
|
||||||
federal_type = forms.ChoiceField(
|
federal_type = forms.ChoiceField(
|
||||||
required=False,
|
required=False,
|
||||||
|
@ -75,6 +78,7 @@ class OrganizationFederalForm(RegistrarForm):
|
||||||
widget=forms.RadioSelect,
|
widget=forms.RadioSelect,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OrganizationElectionForm(RegistrarForm):
|
class OrganizationElectionForm(RegistrarForm):
|
||||||
is_election_board = forms.ChoiceField(
|
is_election_board = forms.ChoiceField(
|
||||||
required=False,
|
required=False,
|
||||||
|
@ -85,6 +89,7 @@ class OrganizationElectionForm(RegistrarForm):
|
||||||
widget=forms.RadioSelect(),
|
widget=forms.RadioSelect(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class OrgContactForm(RegistrarForm):
|
class OrgContactForm(RegistrarForm):
|
||||||
organization_name = forms.CharField(label="Organization Name")
|
organization_name = forms.CharField(label="Organization Name")
|
||||||
address_line1 = forms.CharField(label="Address line 1")
|
address_line1 = forms.CharField(label="Address line 1")
|
||||||
|
@ -94,10 +99,68 @@ class OrgContactForm(RegistrarForm):
|
||||||
)
|
)
|
||||||
us_state = forms.ChoiceField(
|
us_state = forms.ChoiceField(
|
||||||
label="State",
|
label="State",
|
||||||
choices=[('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DE', 'Delaware'), ('DC', 'District of Columbia'), ('FL', 'Florida'), ('GA', 'Georgia'), ('HI', 'Hawaii'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('IA', 'Iowa'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('ME', 'Maine'), ('MD', 'Maryland'), ('MA', 'Massachusetts'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MS', 'Mississippi'), ('MO', 'Missouri'), ('MT', 'Montana'), ('NE', 'Nebraska'), ('NV', 'Nevada'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NY', 'New York'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VT', 'Vermont'), ('VA', 'Virginia'), ('WA', 'Washington'), ('WV', 'West Virginia'), ('WI', 'Wisconsin'), ('WY', 'Wyoming'), ('AS', 'American Samoa'), ('GU', 'Guam'), ('MP', 'Northern Mariana Islands'), ('PR', 'Puerto Rico'), ('VI', 'Virgin Islands'),],
|
choices=[
|
||||||
|
("AL", "Alabama"),
|
||||||
|
("AK", "Alaska"),
|
||||||
|
("AZ", "Arizona"),
|
||||||
|
("AR", "Arkansas"),
|
||||||
|
("CA", "California"),
|
||||||
|
("CO", "Colorado"),
|
||||||
|
("CT", "Connecticut"),
|
||||||
|
("DE", "Delaware"),
|
||||||
|
("DC", "District of Columbia"),
|
||||||
|
("FL", "Florida"),
|
||||||
|
("GA", "Georgia"),
|
||||||
|
("HI", "Hawaii"),
|
||||||
|
("ID", "Idaho"),
|
||||||
|
("IL", "Illinois"),
|
||||||
|
("IN", "Indiana"),
|
||||||
|
("IA", "Iowa"),
|
||||||
|
("KS", "Kansas"),
|
||||||
|
("KY", "Kentucky"),
|
||||||
|
("LA", "Louisiana"),
|
||||||
|
("ME", "Maine"),
|
||||||
|
("MD", "Maryland"),
|
||||||
|
("MA", "Massachusetts"),
|
||||||
|
("MI", "Michigan"),
|
||||||
|
("MN", "Minnesota"),
|
||||||
|
("MS", "Mississippi"),
|
||||||
|
("MO", "Missouri"),
|
||||||
|
("MT", "Montana"),
|
||||||
|
("NE", "Nebraska"),
|
||||||
|
("NV", "Nevada"),
|
||||||
|
("NH", "New Hampshire"),
|
||||||
|
("NJ", "New Jersey"),
|
||||||
|
("NM", "New Mexico"),
|
||||||
|
("NY", "New York"),
|
||||||
|
("NC", "North Carolina"),
|
||||||
|
("ND", "North Dakota"),
|
||||||
|
("OH", "Ohio"),
|
||||||
|
("OK", "Oklahoma"),
|
||||||
|
("OR", "Oregon"),
|
||||||
|
("PA", "Pennsylvania"),
|
||||||
|
("RI", "Rhode Island"),
|
||||||
|
("SC", "South Carolina"),
|
||||||
|
("SD", "South Dakota"),
|
||||||
|
("TN", "Tennessee"),
|
||||||
|
("TX", "Texas"),
|
||||||
|
("UT", "Utah"),
|
||||||
|
("VT", "Vermont"),
|
||||||
|
("VA", "Virginia"),
|
||||||
|
("WA", "Washington"),
|
||||||
|
("WV", "West Virginia"),
|
||||||
|
("WI", "Wisconsin"),
|
||||||
|
("WY", "Wyoming"),
|
||||||
|
("AS", "American Samoa"),
|
||||||
|
("GU", "Guam"),
|
||||||
|
("MP", "Northern Mariana Islands"),
|
||||||
|
("PR", "Puerto Rico"),
|
||||||
|
("VI", "Virgin Islands"),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
zipcode = forms.CharField(label="ZIP code")
|
zipcode = forms.CharField(label="ZIP code")
|
||||||
|
|
||||||
|
|
||||||
class AuthorizingOfficialForm(RegistrarForm):
|
class AuthorizingOfficialForm(RegistrarForm):
|
||||||
given_name = forms.CharField(label="First name/given name")
|
given_name = forms.CharField(label="First name/given name")
|
||||||
middle_name = forms.CharField(
|
middle_name = forms.CharField(
|
||||||
|
@ -109,21 +172,26 @@ class AuthorizingOfficialForm(RegistrarForm):
|
||||||
email = forms.EmailField(label="Email")
|
email = forms.EmailField(label="Email")
|
||||||
phone = forms.CharField(label="Phone")
|
phone = forms.CharField(label="Phone")
|
||||||
|
|
||||||
|
|
||||||
class CurrentSitesForm(RegistrarForm):
|
class CurrentSitesForm(RegistrarForm):
|
||||||
current_site = forms.CharField(
|
current_site = forms.CharField(
|
||||||
required=False,
|
required=False,
|
||||||
label="Enter your organization’s public website, if you have one. For example, www.city.com.")
|
label="Enter your organization’s public website, if you have one. For example, www.city.com.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class DotGovDomainForm(RegistrarForm):
|
class DotGovDomainForm(RegistrarForm):
|
||||||
dotgov_domain = forms.CharField(label="What .gov domain do you want?")
|
dotgov_domain = forms.CharField(label="What .gov domain do you want?")
|
||||||
alternative_domain = forms.CharField(
|
alternative_domain = forms.CharField(
|
||||||
required = False,
|
required=False,
|
||||||
label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.",
|
label="Are there other domains you’d like if we can’t give you your first choice? Entering alternative domains is optional.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PurposeForm(RegistrarForm):
|
class PurposeForm(RegistrarForm):
|
||||||
purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea())
|
purpose_field = forms.CharField(label="Purpose", widget=forms.Textarea())
|
||||||
|
|
||||||
|
|
||||||
class YourContactForm(RegistrarForm):
|
class YourContactForm(RegistrarForm):
|
||||||
given_name = forms.CharField(label="First name/given name")
|
given_name = forms.CharField(label="First name/given name")
|
||||||
middle_name = forms.CharField(
|
middle_name = forms.CharField(
|
||||||
|
@ -135,6 +203,7 @@ class YourContactForm(RegistrarForm):
|
||||||
email = forms.EmailField(label="Email")
|
email = forms.EmailField(label="Email")
|
||||||
phone = forms.CharField(label="Phone")
|
phone = forms.CharField(label="Phone")
|
||||||
|
|
||||||
|
|
||||||
class OtherContactsForm(RegistrarForm):
|
class OtherContactsForm(RegistrarForm):
|
||||||
given_name = forms.CharField(label="First name/given name")
|
given_name = forms.CharField(label="First name/given name")
|
||||||
middle_name = forms.CharField(
|
middle_name = forms.CharField(
|
||||||
|
@ -146,25 +215,30 @@ class OtherContactsForm(RegistrarForm):
|
||||||
email = forms.EmailField(label="Email")
|
email = forms.EmailField(label="Email")
|
||||||
phone = forms.CharField(label="Phone")
|
phone = forms.CharField(label="Phone")
|
||||||
|
|
||||||
|
|
||||||
class SecurityEmailForm(RegistrarForm):
|
class SecurityEmailForm(RegistrarForm):
|
||||||
email = forms.EmailField(
|
email = forms.EmailField(
|
||||||
required=False,
|
required=False,
|
||||||
label="Security email",
|
label="Security email",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AnythingElseForm(RegistrarForm):
|
class AnythingElseForm(RegistrarForm):
|
||||||
anything_else = forms.CharField(
|
anything_else = forms.CharField(
|
||||||
required=False,
|
required=False, label="Anything else we should know", widget=forms.Textarea()
|
||||||
label="Anything else we should know",
|
|
||||||
widget=forms.Textarea()
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class RequirementsForm(RegistrarForm):
|
class RequirementsForm(RegistrarForm):
|
||||||
agree_check = forms.BooleanField(label="I read and agree to the .gov domain requirements.")
|
agree_check = forms.BooleanField(
|
||||||
|
label="I read and agree to the .gov domain requirements."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ReviewForm(RegistrarForm):
|
class ReviewForm(RegistrarForm):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# List of forms in our wizard. Each entry is a tuple of a name and a form
|
# List of forms in our wizard. Each entry is a tuple of a name and a form
|
||||||
# subclass
|
# subclass
|
||||||
FORMS = [
|
FORMS = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue