mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
PR suggestions
This commit is contained in:
parent
8ae6e3e30e
commit
438095e669
6 changed files with 43 additions and 62 deletions
|
@ -1285,6 +1285,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
|
||||||
"no_other_contacts_rationale",
|
"no_other_contacts_rationale",
|
||||||
"anything_else",
|
"anything_else",
|
||||||
"is_policy_acknowledged",
|
"is_policy_acknowledged",
|
||||||
|
"cisa_representative_email",
|
||||||
]
|
]
|
||||||
autocomplete_fields = [
|
autocomplete_fields = [
|
||||||
"approved_domain",
|
"approved_domain",
|
||||||
|
|
|
@ -213,17 +213,21 @@ function HookupYesNoListener(radioButtonName, elementIdToShowIfYes, elementIdToS
|
||||||
// Check if the element exists before accessing its value
|
// Check if the element exists before accessing its value
|
||||||
let selectedValue = radioButtonChecked ? radioButtonChecked.value : null;
|
let selectedValue = radioButtonChecked ? radioButtonChecked.value : null;
|
||||||
|
|
||||||
switch (selectedValue) {
|
if (elementIdToShowIfYes && elementIdToShowIfNo){
|
||||||
case 'True':
|
switch (selectedValue) {
|
||||||
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 1);
|
case 'True':
|
||||||
break;
|
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'False':
|
case 'False':
|
||||||
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 2);
|
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 0);
|
toggleTwoDomElements(elementIdToShowIfYes, elementIdToShowIfNo, 0);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
console.log("No elements to show")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,4 +837,4 @@ function hideDeletedForms() {
|
||||||
*/
|
*/
|
||||||
(function cisaRepresentativesFormListener() {
|
(function cisaRepresentativesFormListener() {
|
||||||
HookupYesNoListener("additional_details-has_cisa_representative",'cisa-representative', null)
|
HookupYesNoListener("additional_details-has_cisa_representative",'cisa-representative', null)
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -156,7 +156,19 @@
|
||||||
|
|
||||||
|
|
||||||
{% if step == Step.ADDITIONAL_DETAILS %}
|
{% 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 %}
|
||||||
|
|
||||||
|
<h3 class="register-form-review-header">Anything else</h3>
|
||||||
|
<ul class="usa-list usa-list--unstyled margin-top-0">
|
||||||
|
{% if domain_request.has_anything_else_text %}
|
||||||
|
{{domain_request.anything_else}}
|
||||||
|
{% else %}
|
||||||
|
No
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
{% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.no_other_contacts_rationale heading_level=heading_level %}
|
||||||
{% endif %}
|
{% 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 %}
|
||||||
|
|
||||||
|
<h3 class="register-form-review-header">Anything else</h3>
|
||||||
|
<ul class="usa-list usa-list--unstyled margin-top-0">
|
||||||
|
{% if domain_request.has_anything_else_text %}
|
||||||
|
{{domain_request.anything_else}}
|
||||||
|
{% else %}
|
||||||
|
No
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
{% load static url_helpers %}
|
|
||||||
|
|
||||||
<!-- TODO (future ticket?): create a template that allows us to easily display nested forms.
|
|
||||||
It is a little complex because we will have to formulate how to aggregate form pairings.
|
|
||||||
(eg. yes/no radio forms plus the information they toggle need to be linked somehow
|
|
||||||
and condense down into one subsection) -->
|
|
||||||
|
|
||||||
<section class="summary-item margin-top-3">
|
|
||||||
<hr class="" aria-hidden="true" />
|
|
||||||
<div class="display-flex flex-justify">
|
|
||||||
<div>
|
|
||||||
<h2
|
|
||||||
class="summary-item__title
|
|
||||||
font-sans-md
|
|
||||||
text-primary-dark text-semibold
|
|
||||||
margin-top-0 margin-bottom-05
|
|
||||||
padding-right-1"
|
|
||||||
>
|
|
||||||
Additional details
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
{% if domainRequest is not none %}
|
|
||||||
<dl class="usa-list usa-list--unstyled margin-top-0">
|
|
||||||
<dt>
|
|
||||||
CISA regions representative
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
{% if domainRequest.has_cisa_representative %}
|
|
||||||
{{domainRequest.cisa_representative_email}}
|
|
||||||
{% else %}
|
|
||||||
(none)
|
|
||||||
{% endif %}
|
|
||||||
</dd>
|
|
||||||
<dt>
|
|
||||||
Anything else
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
{% if domainRequest.has_anything_else_text %}
|
|
||||||
{{domainRequest.anything_else}}
|
|
||||||
{% else %}
|
|
||||||
No
|
|
||||||
{% endif %}
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
{% else %}
|
|
||||||
ERROR Please contact technical support/dev
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
|
@ -21,6 +21,9 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
</h2>
|
</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if sub_header_text %}
|
||||||
|
<h3 class="register-form-review-header">{{ sub_header_text }}</h3>
|
||||||
|
{% endif %}
|
||||||
{% if address %}
|
{% if address %}
|
||||||
{% include "includes/organization_address.html" with organization=value %}
|
{% include "includes/organization_address.html" with organization=value %}
|
||||||
{% elif contact %}
|
{% elif contact %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue