Add text for expired

This commit is contained in:
zandercymatics 2024-02-02 10:57:11 -07:00
parent 9381ee3908
commit 24954ebdce
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 25 additions and 3 deletions

View file

@ -1425,8 +1425,17 @@ class Domain(TimeStampedModel, DomainHelper):
logger.info("able to transition to DNS_NEEDED state")
def get_state_help_text(self) -> str:
"""Returns a str containing additional information about a given state"""
help_text = Domain.State.get_help_text(self.state)
"""Returns a str containing additional information about a given state.
Returns custom content for when the domain itself is expired."""
if not self.is_expired():
help_text = Domain.State.get_help_text(self.state)
else:
# Given expired is not a physical state, but it is displayed as such,
# We need custom logic to determine this message.
help_text = (
"This domain has expired, but it is still online. "
"To renew this domain, contact help@get.gov."
)
return help_text
def _disclose_fields(self, contact: PublicContact):