mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 02:19:23 +02:00
cleanup pt 2
This commit is contained in:
parent
a3fa71659a
commit
fac35748cc
2 changed files with 4 additions and 9 deletions
|
@ -51,11 +51,6 @@ class DomainRequest(TimeStampedModel):
|
||||||
"""Returns the associated label for a given status name"""
|
"""Returns the associated label for a given status name"""
|
||||||
return cls(status_name).label if status_name else None
|
return cls(status_name).label if status_name else None
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def statuses_awaiting_review(cls):
|
|
||||||
"""Returns all statuses that are awaiting a review from analysts"""
|
|
||||||
return [cls.SUBMITTED, cls.IN_REVIEW]
|
|
||||||
|
|
||||||
class StateTerritoryChoices(models.TextChoices):
|
class StateTerritoryChoices(models.TextChoices):
|
||||||
ALABAMA = "AL", "Alabama (AL)"
|
ALABAMA = "AL", "Alabama (AL)"
|
||||||
ALASKA = "AK", "Alaska (AK)"
|
ALASKA = "AK", "Alaska (AK)"
|
||||||
|
@ -590,7 +585,7 @@ class DomainRequest(TimeStampedModel):
|
||||||
|
|
||||||
def is_awaiting_review(self) -> bool:
|
def is_awaiting_review(self) -> bool:
|
||||||
"""Checks if the current status is in submitted or in_review"""
|
"""Checks if the current status is in submitted or in_review"""
|
||||||
return self.status in DomainRequest.DomainRequestStatus.statuses_awaiting_review()
|
return self.status in [self.DomainRequestStatus.SUBMITTED, self.DomainRequestStatus.IN_REVIEW]
|
||||||
|
|
||||||
def get_first_status_set_date(self, status):
|
def get_first_status_set_date(self, status):
|
||||||
"""Returns the date when the domain request was first set to the given status."""
|
"""Returns the date when the domain request was first set to the given status."""
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
{% if not DomainRequest.requested_domain and DomainRequest.status == DomainRequest.DomainRequestStatus.STARTED %}
|
{% if not DomainRequest.requested_domain and DomainRequest.status == DomainRequest.DomainRequestStatus.STARTED %}
|
||||||
<h1>New domain request</h1>
|
<h1>New domain request</h1>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>{{ DomainRequest.requested_domain.name }}</h1>
|
<h1>Domain request for {{ DomainRequest.requested_domain.name }}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
|
@ -125,8 +125,8 @@
|
||||||
{% endblock status_metadata %}
|
{% endblock status_metadata %}
|
||||||
|
|
||||||
{% block status_blurb %}
|
{% block status_blurb %}
|
||||||
{% if DomainRequest.is_withdrawable %}
|
{% if DomainRequest.is_awaiting_review %}
|
||||||
<p>{% include "includes/domain_request_awaiting_review.html" with show_withdraw_text=True %}</p>
|
<p>{% include "includes/domain_request_awaiting_review.html" with show_withdraw_text=DomainRequest.is_withdrawable %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock status_blurb %}
|
{% endblock status_blurb %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue