mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 09:46:06 +02:00
refactor application_review to use summary_item
This commit is contained in:
parent
19c72b1858
commit
37c8c2b05e
3 changed files with 147 additions and 100 deletions
|
@ -12,7 +12,7 @@
|
||||||
margin-top: units(1);
|
margin-top: units(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-form-step h3 {
|
.register-form-step h3:not(.text-base-darker) {
|
||||||
color: color('primary-dark');
|
color: color('primary-dark');
|
||||||
letter-spacing: $letter-space--xs;
|
letter-spacing: $letter-space--xs;
|
||||||
margin-top: units(3);
|
margin-top: units(3);
|
||||||
|
|
|
@ -20,113 +20,158 @@
|
||||||
|
|
||||||
{% block form_fields %}
|
{% block form_fields %}
|
||||||
{% for step in steps.all|slice:":-1" %}
|
{% for step in steps.all|slice:":-1" %}
|
||||||
<section class="review__step">
|
<section class="summary-item margin-top-3">
|
||||||
<hr />
|
|
||||||
<div class="review__step__title display-flex flex-justify">
|
{% if step == Step.ORGANIZATION_TYPE %}
|
||||||
<div class="review__step__value">
|
{% namespaced_url 'application' step as application_url %}
|
||||||
<div class="review__step__name">{{ form_titles|get_item:step }}</div>
|
{% if application.organization_type is not None %}
|
||||||
<div>
|
{% with title=form_titles|get_item:step value=application.organization_type|get_organization_long_name|default:"Incomplete" %}
|
||||||
{% if step == Step.ORGANIZATION_TYPE %}
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
{% if application.organization_type is not None %}
|
{% endwith %}
|
||||||
{% with long_org_type=application.organization_type|get_organization_long_name %}
|
{% else %}
|
||||||
<p>{{ long_org_type }}</p>
|
{% with title=form_titles|get_item:step value="Incomplete" %}
|
||||||
{% endwith %}
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
{% else %}
|
{% endwith %}
|
||||||
<p>Incomplete</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.TRIBAL_GOVERNMENT %}
|
{% endif %}
|
||||||
{{ application.tribe_name|default:"Incomplete" }}
|
|
||||||
{% if application.federally_recognized_tribe %}<p>Federally-recognized tribe</p>{% endif %}
|
{% if step == Step.TRIBAL_GOVERNMENT %}
|
||||||
{% if application.state_recognized_tribe %}<p>State-recognized tribe</p>{% endif %}
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.tribe_name|default:"Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
|
{% if application.federally_recognized_tribe %}<p>Federally-recognized tribe</p>{% endif %}
|
||||||
|
{% if application.state_recognized_tribe %}<p>State-recognized tribe</p>{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if step == Step.ORGANIZATION_FEDERAL %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.get_federal_type_display|default:"Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if step == Step.ORGANIZATION_ELECTION %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.is_election_board|yesno:"Yes,No,Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if step == Step.ORGANIZATION_CONTACT %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% if application.organization_name %}
|
||||||
|
{% with title=form_titles|get_item:step value=application %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url address='true' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% with title=form_titles|get_item:step value='Incomplete' %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.ORGANIZATION_FEDERAL %}
|
{% endif %}
|
||||||
<p>{{ application.get_federal_type_display|default:"Incomplete" }}</p>
|
|
||||||
|
{% if step == Step.ABOUT_YOUR_ORGANIZATION %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.about_your_organization|default:"Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if step == Step.AUTHORIZING_OFFICIAL %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% if application.authorizing_official is not None %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.authorizing_official %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% with title=form_titles|get_item:step value="Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.ORGANIZATION_ELECTION %}
|
{% endif %}
|
||||||
<p>{{ application.is_election_board|yesno:"Yes,No,Incomplete" }}</p>
|
|
||||||
|
{% if step == Step.CURRENT_SITES %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% if application.alternative_domains.all %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.current_websites.all %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url list='true' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% with title=form_titles|get_item:step value='None' %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.ORGANIZATION_CONTACT %}
|
{% endif %}
|
||||||
{% if application.organization_name %}
|
|
||||||
{% include "includes/organization_address.html" with organization=application %}
|
{% if step == Step.DOTGOV_DOMAIN %}
|
||||||
{% else %}
|
{% namespaced_url 'application' step as application_url %}
|
||||||
<p>Incomplete</p>
|
{% with title=form_titles|get_item:step value=application.requested_domain.name|default:"Incomplete" %}
|
||||||
{% endif %}
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
{% endif %}
|
{% endwith %}
|
||||||
{% if step == Step.ABOUT_YOUR_ORGANIZATION %}
|
|
||||||
<p>{{ application.about_your_organization|default:"Incomplete" }}</p>
|
{% if application.alternative_domains.all %}
|
||||||
{% endif %}
|
<h3 class="margin-bottom-0 text-base-darker">Alternative domains</h3>
|
||||||
{% if step == Step.AUTHORIZING_OFFICIAL %}
|
<ul class="usa-list margin-top-0">
|
||||||
{% if application.authorizing_official %}
|
{% for site in application.alternative_domains.all %}
|
||||||
<div class="margin-bottom-105">
|
|
||||||
{% include "includes/contact.html" with contact=application.authorizing_official %}
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<p>Incomplete</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% if step == Step.CURRENT_SITES %}
|
|
||||||
<ul class="add-list-reset">
|
|
||||||
{% for site in application.current_websites.all %}
|
|
||||||
<li>{{ site.website }}</li>
|
<li>{{ site.website }}</li>
|
||||||
{% empty %}
|
|
||||||
<li>None</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.DOTGOV_DOMAIN %}
|
{% endif %}
|
||||||
<ul class="add-list-reset margin-bottom-105">
|
|
||||||
<li>{{ application.requested_domain.name|default:"Incomplete" }}</li>
|
{% if step == Step.PURPOSE %}
|
||||||
</ul>
|
{% namespaced_url 'application' step as application_url %}
|
||||||
{% if application.alternative_domains.all %}
|
{% with title=form_titles|get_item:step value=application.purpose|default:"Incomplete" %}
|
||||||
<div class="margin-bottom-105">
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
<p class="text-semibold margin-top-1 margin-bottom-0">Alternative domains</p>
|
{% endwith %}
|
||||||
<ul class="add-list-reset">
|
{% endif %}
|
||||||
{% for site in application.alternative_domains.all %}
|
|
||||||
<li>{{ site.website }}</li>
|
{% if step == Step.YOUR_CONTACT %}
|
||||||
{% endfor %}
|
{% namespaced_url 'application' step as application_url %}
|
||||||
</ul>
|
{% if application.submitter is not None %}
|
||||||
</div>
|
{% with title=form_titles|get_item:step value=application.submitter %}
|
||||||
{% endif %}
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% with title=form_titles|get_item:step value="Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.PURPOSE %}
|
{% endif %}
|
||||||
<p>{{ application.purpose|default:"Incomplete" }}</p>
|
|
||||||
|
{% if step == Step.OTHER_CONTACTS %}
|
||||||
|
{% namespaced_url 'application' step as application_url %}
|
||||||
|
{% if application.other_contacts.all %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.other_contacts.all %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url contact='true' list='true' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% with title=form_titles|get_item:step value=application.no_other_contacts_rationale|default:"Incomplete" %}
|
||||||
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.YOUR_CONTACT %}
|
{% endif %}
|
||||||
{% if application.submitter %}
|
|
||||||
<div class="margin-bottom-105">
|
|
||||||
{% include "includes/contact.html" with contact=application.submitter %}
|
{% if step == Step.ANYTHING_ELSE %}
|
||||||
</div>
|
{% namespaced_url 'application' step as application_url %}
|
||||||
{% else %}
|
{% with title=form_titles|get_item:step value=application.anything_else|default:"No" %}
|
||||||
<p>Incomplete</p>
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
{% endif %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if step == Step.OTHER_CONTACTS %}
|
|
||||||
{% for other in application.other_contacts.all %}
|
|
||||||
<div class="margin-bottom-105">
|
{% if step == Step.REQUIREMENTS %}
|
||||||
<p class="text-semibold margin-top-1 margin-bottom-0">Contact {{ forloop.counter }}</p>
|
{% namespaced_url 'application' step as application_url %}
|
||||||
{% include "includes/contact.html" with contact=other %}
|
{% with title=form_titles|get_item:step value=application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." %}
|
||||||
</div>
|
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=application_url %}
|
||||||
{% empty %}
|
{% endwith %}
|
||||||
<div class="margin-bottom-105">
|
{% endif %}
|
||||||
<p class="text-semibold margin-top-1 margin-bottom-0">No other employees from your organization?</p>
|
|
||||||
<p>{{ application.no_other_contacts_rationale|default:"Incomplete" }}</p>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% if step == Step.ANYTHING_ELSE %}
|
|
||||||
<p>{{ application.anything_else|default:"No" }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% if step == Step.REQUIREMENTS %}
|
|
||||||
<p>{{ application.is_policy_acknowledged|yesno:"I agree.,I do not agree.,I do not agree." }}</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a
|
|
||||||
aria-describedby="review_step_title__{{step}}"
|
|
||||||
href="{% namespaced_url 'application' step %}"
|
|
||||||
>Edit<span class="sr-only"> {{ form_titles|get_item:step }}</span></a>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -31,8 +31,10 @@
|
||||||
<ul class="usa-list usa-list--unstyled margin-top-0">
|
<ul class="usa-list usa-list--unstyled margin-top-0">
|
||||||
{% for item in value %}
|
{% for item in value %}
|
||||||
<li>
|
<li>
|
||||||
<p class="text-semibold margin-top-1 margin-bottom-0">
|
<p class="margin-top-1 margin-bottom-0">
|
||||||
Contact {{forloop.counter}}
|
<strong>
|
||||||
|
Contact {{forloop.counter}}
|
||||||
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
{% include "includes/contact.html" with contact=item %}</li>
|
{% include "includes/contact.html" with contact=item %}</li>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue