mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 11:16:07 +02:00
changes so far
This commit is contained in:
parent
436809f711
commit
6599515f68
3 changed files with 70 additions and 17 deletions
|
@ -1694,15 +1694,14 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
"last_submitted_date",
|
||||
"last_status_update",
|
||||
"status",
|
||||
"federal_type",
|
||||
"federal_agency",
|
||||
"custom_election_board",
|
||||
"city",
|
||||
"state_territory",
|
||||
"investigator",
|
||||
"get_generic_org_type",
|
||||
"get_organization_name",
|
||||
"organization_name"
|
||||
"converted_generic_org_type",
|
||||
"converted_organization_name",
|
||||
"converted_federal_agency",
|
||||
"converted_federal_type",
|
||||
"converted_city",
|
||||
]
|
||||
|
||||
orderable_fk_fields = [
|
||||
|
|
|
@ -1336,7 +1336,7 @@ class DomainRequest(TimeStampedModel):
|
|||
return True
|
||||
|
||||
@property
|
||||
def get_organization_name(self):
|
||||
def converted_organization_name(self):
|
||||
""""returns the organization field if the domain request is in a portfolio
|
||||
otherwise it returns the organization name from the domain request object itself"""
|
||||
if self.portfolio:
|
||||
|
@ -1344,9 +1344,63 @@ class DomainRequest(TimeStampedModel):
|
|||
return self.organization_name
|
||||
|
||||
@property
|
||||
def get_generic_org_type(self):
|
||||
def converted_generic_org_type(self):
|
||||
""""returns the organization type if the domain request is in a portfolio
|
||||
otherwise it returns the organization type from the domain request object itself"""
|
||||
if self.portfolio:
|
||||
return self.portfolio.organization_type
|
||||
return self.generic_org_type
|
||||
|
||||
@property
|
||||
def converted_federal_agency(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.federal_agency
|
||||
return self.federal_agency
|
||||
|
||||
@property
|
||||
def converted_federal_type(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.federal_type
|
||||
return self.federal_type
|
||||
|
||||
@property
|
||||
def converted_senior_official(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.senior_official
|
||||
return self.senior_official
|
||||
|
||||
@property
|
||||
def converted_address_line1(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.address_line_1
|
||||
return self.address_line1
|
||||
|
||||
@property
|
||||
def converted_address_line2(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.address_line_2
|
||||
return self.address_line2
|
||||
|
||||
@property
|
||||
def converted_city(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.city
|
||||
return self.city
|
||||
|
||||
@property
|
||||
def converted_state_terrority(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.state_territory
|
||||
return self.state_territory
|
||||
|
||||
@property
|
||||
def converted_zipcode(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.zipcode
|
||||
return self.zipcode
|
||||
|
||||
@property
|
||||
def converted_urbanization(self):
|
||||
if self.portfolio:
|
||||
return self.portfolio.urbanization
|
||||
return self.urbanization
|
|
@ -2,8 +2,8 @@
|
|||
{% if organization.federal_agency %}
|
||||
{{ organization.federal_agency }}<br />
|
||||
{% endif %}
|
||||
{% if organization.get_organization_name %}
|
||||
{{ organization.get_organization_name }}
|
||||
{% if organization.converted_organization_name %}
|
||||
{{ organization.converted_organization_name }}
|
||||
{% endif %}
|
||||
{% if organization.address_line1 %}
|
||||
<br />{{ organization.address_line1 }}
|
||||
|
@ -11,18 +11,18 @@
|
|||
{% if organization.address_line2 %}
|
||||
<br />{{ organization.address_line2 }}
|
||||
{% endif %}
|
||||
{% if organization.city %}
|
||||
<br />{{ organization.city }}{% if organization.state_territory %},
|
||||
{% if organization.converted_city %}
|
||||
<br />{{ organization.converted_city}}{% if organization.state_territory %},
|
||||
{% else %}<br />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if organization.state_territory %}
|
||||
{{ organization.state_territory }}
|
||||
{% endif %}
|
||||
{% if organization.zipcode %}
|
||||
<br />{{ organization.zipcode }}
|
||||
{% if organization.converted_zipcode %}
|
||||
<br />{{ organization.converted_zipcode }}
|
||||
{% endif %}
|
||||
{% if organization.urbanization %}
|
||||
<br />{{ organization.urbanization }}
|
||||
{% if organization.converted_urbanization %}
|
||||
<br />{{ organization.converted_urbanization }}
|
||||
{% endif %}
|
||||
</address>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue