diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 393cdf23d..292ecf01f 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1076,6 +1076,14 @@ class DomainAdmin(ListHeaderAdmin): # Table ordering 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): # match the CSV example with all the fields response = HttpResponse(content_type="text/csv") diff --git a/src/registrar/templates/django/admin/domain_change_form.html b/src/registrar/templates/django/admin/domain_change_form.html index d0fd46800..b48f04e60 100644 --- a/src/registrar/templates/django/admin/domain_change_form.html +++ b/src/registrar/templates/django/admin/domain_change_form.html @@ -70,8 +70,17 @@ Are you sure you want to extend the expiration date?
-

+ This will extend the expiration date by one year. +

+

+ Domain: {{ original.name }} +
+ New expiration date: {{ extended_expiration_date }} + {{test}} +

+

+ This action cannot be undone.

@@ -83,7 +92,7 @@ class="usa-button dja-form-placeholder" name="_extend_expiration_date" > - Confirm + Yes, extend date