diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 72ba29db4..cc19d4a10 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1285,6 +1285,7 @@ class DomainRequestAdmin(ListHeaderAdmin): "no_other_contacts_rationale", "anything_else", "is_policy_acknowledged", + "cisa_representative_email", ] autocomplete_fields = [ "approved_domain", diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 3c1b1099f..4cefd798b 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -213,17 +213,21 @@ function HookupYesNoListener(radioButtonName, elementIdToShowIfYes, elementIdToS // Check if the element exists before accessing its value let selectedValue = radioButtonChecked ? radioButtonChecked.value : null; - switch (selectedValue) { - case 'True': - toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 1); - break; + if (elementIdToShowIfYes && elementIdToShowIfNo){ + switch (selectedValue) { + case 'True': + toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 1); + break; - case 'False': - toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 2); - break; + case 'False': + toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 2); + break; - default: - toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 0); + default: + toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 0); + } + }else { + console.log("No elements to show") } } @@ -833,4 +837,4 @@ function hideDeletedForms() { */ (function cisaRepresentativesFormListener() { HookupYesNoListener("additional_details-has_cisa_representative",'cisa-representative', null) -})(); \ No newline at end of file +})(); diff --git a/src/registrar/templates/domain_request_review.html b/src/registrar/templates/domain_request_review.html index 569fd717c..ce061b321 100644 --- a/src/registrar/templates/domain_request_review.html +++ b/src/registrar/templates/domain_request_review.html @@ -156,7 +156,19 @@ {% if step == Step.ADDITIONAL_DETAILS %} - {% include "includes/summary_additional_details.html" with domainRequest=domain_request %} + {% namespaced_url 'domain-request' step as domain_request_url %} + {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete" %} + {% include "includes/summary_item.html" with title=title sub_header_text='CISA regions representative' value=domain_request.cisa_representative_email heading_level=heading_level editable=True edit_link=domain_request_url %} + {% endwith %} + +

Anything else

+ {% endif %} diff --git a/src/registrar/templates/domain_request_status.html b/src/registrar/templates/domain_request_status.html index cf9e7ffe3..2be2cc44b 100644 --- a/src/registrar/templates/domain_request_status.html +++ b/src/registrar/templates/domain_request_status.html @@ -116,7 +116,18 @@ {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.no_other_contacts_rationale heading_level=heading_level %} {% endif %} - {% include "includes/summary_additional_details.html" with domainRequest=DomainRequest %} + {% if DomainRequest.has_cisa_representative or domain_request.has_anything_else_text %} + {% include "includes/summary_item.html" with title='Additional details' sub_header_text='CISA regions representative' value=domain_request.cisa_representative_email heading_level=heading_level %} + +

Anything else

+ + {% endif %} {% endwith %} diff --git a/src/registrar/templates/includes/summary_additional_details.html b/src/registrar/templates/includes/summary_additional_details.html deleted file mode 100644 index 233734e7d..000000000 --- a/src/registrar/templates/includes/summary_additional_details.html +++ /dev/null @@ -1,50 +0,0 @@ -{% load static url_helpers %} - - - -
- -
-
-

- Additional details -

- - {% if domainRequest is not none %} -
-
- CISA regions representative -
-
- {% if domainRequest.has_cisa_representative %} - {{domainRequest.cisa_representative_email}} - {% else %} - (none) - {% endif %} -
-
- Anything else -
-
- {% if domainRequest.has_anything_else_text %} - {{domainRequest.anything_else}} - {% else %} - No - {% endif %} -
-
- {% else %} - ERROR Please contact technical support/dev - {% endif %} -
-
-
diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index 7c0d801ad..0988068df 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -21,6 +21,9 @@ {% else %} {% endif %} + {% if sub_header_text %} +

{{ sub_header_text }}

+ {% endif %} {% if address %} {% include "includes/organization_address.html" with organization=value %} {% elif contact %}