mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-06 04:27:22 +02:00
Update tests on common.py
This commit is contained in:
parent
98e61d606d
commit
763e7b6351
4 changed files with 21 additions and 19 deletions
|
@ -13,7 +13,7 @@ from registrar.forms.utility.wizard_form_helper import (
|
|||
BaseYesNoForm,
|
||||
BaseDeletableRegistrarForm,
|
||||
)
|
||||
from registrar.models import Contact, DomainRequest, DraftDomain, Domain
|
||||
from registrar.models import Contact, DomainRequest, DraftDomain, Domain, FederalAgency
|
||||
from registrar.templatetags.url_helpers import public_site_url
|
||||
from registrar.utility.enums import ValidationReturnType
|
||||
|
||||
|
@ -97,13 +97,16 @@ class OrganizationElectionForm(RegistrarForm):
|
|||
|
||||
class OrganizationContactForm(RegistrarForm):
|
||||
# for federal agencies we also want to know the top-level agency.
|
||||
federal_agency = forms.ChoiceField(
|
||||
federal_agency = forms.ModelChoiceField(
|
||||
label="Federal agency",
|
||||
# not required because this field won't be filled out unless
|
||||
# it is a federal agency. Use clean to check programatically
|
||||
# if it has been filled in when required.
|
||||
required=False,
|
||||
choices=[("", "--Select--")] + DomainRequest.AGENCY_CHOICES,
|
||||
# uncomment to see if modelChoiceField can be an arg later
|
||||
# required=False,
|
||||
queryset=FederalAgency.objects.all(),
|
||||
empty_label="--Select--",
|
||||
# choices=[("", "--Select--")] + DomainRequest.AGENCY_CHOICES,
|
||||
)
|
||||
organization_name = forms.CharField(
|
||||
label="Organization name",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue