diff --git a/src/registrar/assets/sass/_theme/_forms.scss b/src/registrar/assets/sass/_theme/_forms.scss index bdef522eb..490bf7986 100644 --- a/src/registrar/assets/sass/_theme/_forms.scss +++ b/src/registrar/assets/sass/_theme/_forms.scss @@ -33,7 +33,7 @@ } .incomplete { - color: red; + color: #950E24; font-weight: bold; } diff --git a/src/registrar/templates/domain_request_form.html b/src/registrar/templates/domain_request_form.html index 405876da6..b176866cc 100644 --- a/src/registrar/templates/domain_request_form.html +++ b/src/registrar/templates/domain_request_form.html @@ -84,13 +84,6 @@ value="save_and_return" class="usa-button usa-button--outline" >Save and return to manage your domains - {% else %} - {% include 'includes/modal.html' with modal_heading=modal_heading|safe modal_description="Once you submit this request, you won’t be able to edit it until we review it. You’ll only be able to withdraw your request." modal_button=modal_button|safe %} + {% include 'includes/modal.html' with review_form_is_complete=review_form_is_complete modal_heading=modal_heading|safe modal_description=modal_description|safe modal_button=modal_button|safe %} - - {% block after_form_content %}{% endblock %} diff --git a/src/registrar/templates/domain_request_review.html b/src/registrar/templates/domain_request_review.html index 88a9c128e..2960e40c7 100644 --- a/src/registrar/templates/domain_request_review.html +++ b/src/registrar/templates/domain_request_review.html @@ -25,11 +25,11 @@ {% if step == Step.ORGANIZATION_TYPE %} {% namespaced_url 'domain-request' step as domain_request_url %} {% if domain_request.generic_org_type is not None %} - {% with title=form_titles|get_item:step value=domain_request.get_generic_org_type_display|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.get_generic_org_type_display|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% else %} - {% with title=form_titles|get_item:step value="Incomplete" %} + {% with title=form_titles|get_item:step value="Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -47,7 +47,7 @@ {% if step == Step.ORGANIZATION_FEDERAL %} {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.get_federal_type_display|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.get_federal_type_display|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -66,7 +66,7 @@ {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url address='true' %} {% endwith %} {% else %} - {% with title=form_titles|get_item:step value='Incomplete' %} + {% with title=form_titles|get_item:step value="Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -74,7 +74,7 @@ {% if step == Step.ABOUT_YOUR_ORGANIZATION %} {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.about_your_organization|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.about_your_organization|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -86,7 +86,7 @@ {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' %} {% endwith %} {% else %} - {% with title=form_titles|get_item:step value="Incomplete" %} + {% with title=form_titles|get_item:step value="Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -107,7 +107,7 @@ {% if step == Step.DOTGOV_DOMAIN %} {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete"|safe%} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} @@ -123,7 +123,7 @@ {% if step == Step.PURPOSE %} {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.purpose|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.purpose|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -135,7 +135,7 @@ {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' %} {% endwith %} {% else %} - {% with title=form_titles|get_item:step value="Incomplete" %} + {% with title=form_titles|get_item:step value="Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -148,7 +148,7 @@ {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url contact='true' list='true' %} {% endwith %} {% else %} - {% with title=form_titles|get_item:step value=domain_request.no_other_contacts_rationale|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.no_other_contacts_rationale|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=True edit_link=domain_request_url %} {% endwith %} {% endif %} @@ -157,7 +157,7 @@ {% if step == Step.ADDITIONAL_DETAILS %} {% namespaced_url 'domain-request' step as domain_request_url %} - {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete" %} + {% with title=form_titles|get_item:step value=domain_request.requested_domain.name|default:"Incomplete"|safe %} {% include "includes/summary_item.html" with title=title sub_header_text='CISA regional representative' value=domain_request.cisa_representative_email heading_level=heading_level editable=True edit_link=domain_request_url custom_text_for_value_none='No' %} {% endwith %} diff --git a/src/registrar/templates/includes/modal.html b/src/registrar/templates/includes/modal.html index 8e6cb66d5..24b581516 100644 --- a/src/registrar/templates/includes/modal.html +++ b/src/registrar/templates/includes/modal.html @@ -39,7 +39,7 @@ Cancel - {% else %} + {% elif review_form_is_complete %} " # Concatenate the modal header that we'll pass to the modal. - # TODO: Still need to log! context_stuff = {} - print("!!!!!!!!! before form complete") - print("!!!!!!!!! self.form_complete is", self._form_complete()) if self._form_complete(): print("!!!!!!!in form complete section") + modal_button = '" context_stuff = { "form_titles": self.TITLES, "steps": self.steps, @@ -453,20 +564,24 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): "modal_button": modal_button, "modal_heading": "You are about to submit a domain request for " + str(self.domain_request.requested_domain), + "modal_description": "Once you submit this request, you won’t be able to edit it until we review it.\ + You’ll only be able to withdraw your request.", + "review_form_is_complete": True, } else: # form is not complete print("!!!!!!! form is not complete") + modal_button = '" context_stuff = { "form_titles": self.TITLES, "steps": self.steps, - # Add information about which steps should be unlocked "visited": self.storage.get("step_history", []), "is_federal": self.domain_request.is_federal(), - # "modal_button": We'll have to set some kind of go back button - # And fix wording in text for domain_request_form + "modal_button": modal_button, "modal_heading": "You can’t submit this request", + "modal_description": "You can’t submit this request because it’s incomplete.\ + Click return to request and complete the sections that are missing information.", + "review_form_is_complete": False, } - return context_stuff def get_step_list(self) -> list: @@ -727,6 +842,8 @@ class Review(DomainRequestWizard): forms = [] # type: ignore def get_context_data(self): + if self._form_complete() is False: + logger.warning("User arrived at review page with an incomplete form.") context = super().get_context_data() context["Step"] = Step.__members__ context["domain_request"] = self.domain_request