mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
added logic to shorten text if its too long
This commit is contained in:
parent
2f009ee15c
commit
c34025fbb0
1 changed files with 6 additions and 1 deletions
|
@ -379,6 +379,11 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
if self.domain_request.requested_domain is not None:
|
if self.domain_request.requested_domain is not None:
|
||||||
requested_domain_name = self.domain_request.requested_domain.name
|
requested_domain_name = self.domain_request.requested_domain.name
|
||||||
|
|
||||||
|
text_domain_name = str(requested_domain_name) if requested_domain_name is not None else None
|
||||||
|
|
||||||
|
if text_domain_name and len(text_domain_name) > 30:
|
||||||
|
text_domain_name = text_domain_name[:27] + "..."
|
||||||
|
|
||||||
context_stuff = {}
|
context_stuff = {}
|
||||||
if DomainRequest._form_complete(self.domain_request, self.request):
|
if DomainRequest._form_complete(self.domain_request, self.request):
|
||||||
modal_button = '<button type="submit" ' 'class="usa-button" ' ">Submit request</button>"
|
modal_button = '<button type="submit" ' 'class="usa-button" ' ">Submit request</button>"
|
||||||
|
@ -390,7 +395,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
"is_federal": self.domain_request.is_federal(),
|
"is_federal": self.domain_request.is_federal(),
|
||||||
"modal_button": modal_button,
|
"modal_button": modal_button,
|
||||||
"modal_heading": "You are about to submit a domain request for "
|
"modal_heading": "You are about to submit a domain request for "
|
||||||
+ str(self.domain_request.requested_domain),
|
+ text_domain_name,
|
||||||
"modal_description": "Once you submit this request, you won’t be able to edit it until we review it.\
|
"modal_description": "Once you submit this request, you won’t be able to edit it until we review it.\
|
||||||
You’ll only be able to withdraw your request.",
|
You’ll only be able to withdraw your request.",
|
||||||
"review_form_is_complete": True,
|
"review_form_is_complete": True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue