Update modal text

This commit is contained in:
zandercymatics 2024-02-12 08:42:49 -07:00
parent 2765f46d3a
commit 49a8360675
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 20 additions and 3 deletions

View file

@ -1076,6 +1076,14 @@ class DomainAdmin(ListHeaderAdmin):
# Table ordering # Table ordering
ordering = ["name"] ordering = ["name"]
def changeform_view(self, request, object_id=None, form_url="", extra_context=None):
if extra_context is None:
extra_context = {}
# Pass in what the an extended expiration date would be
# for the expiration date modal
extra_context["extended_expiration_date"] = date.today() + relativedelta(years=1)
return super().changeform_view(request, object_id, form_url, extra_context)
def export_data_type(self, request): def export_data_type(self, request):
# match the CSV example with all the fields # match the CSV example with all the fields
response = HttpResponse(content_type="text/csv") response = HttpResponse(content_type="text/csv")

View file

@ -70,8 +70,17 @@
Are you sure you want to extend the expiration date? Are you sure you want to extend the expiration date?
</h2> </h2>
<div class="usa-prose"> <div class="usa-prose">
<p id="modal-1-description"> <p>
This action will extend the expiration date by a year. This will extend the expiration date by one year.
</p>
<p>
Domain: <b>{{ original.name }}</b>
<br>
New expiration date: <b>{{ extended_expiration_date }}</b>
{{test}}
</p>
<p>
<b>This action cannot be undone.</b>
</p> </p>
</div> </div>
@ -83,7 +92,7 @@
class="usa-button dja-form-placeholder" class="usa-button dja-form-placeholder"
name="_extend_expiration_date" name="_extend_expiration_date"
> >
Confirm Yes, extend date
</button> </button>
</li> </li>
<li class="usa-button-group__item"> <li class="usa-button-group__item">