diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index c716ad49c..7501dc1f0 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -724,3 +724,15 @@ div.dja__model-description{ .text-underline { text-decoration: underline !important; } + +//-- Override some styling for the USWDS summary box (per design quidance for ticket #2055 +.usa-summary-box { + background: #{$dhs-blue-10}; + border-color: #{$dhs-blue-30}; + max-width: 72ex; + word-wrap: break-word; +} + +.usa-summary-box h3 { + color: #{$dhs-blue-60}; +} diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index 57a1c53d7..d4bdeea66 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -988,9 +988,9 @@ class DomainRequest(TimeStampedModel): def _is_submitter_complete(self): return self.submitter is not None - def _is_other_contacts_complete(self): - # If the object even exists and double check each part is filled out - if ( + def _has_other_contacts_and_filled(self): + # Other Contacts Radio button is Yes and if all required fields are filled + return ( self.has_other_contacts() and self.other_contacts.filter( first_name__isnull=False, @@ -999,28 +999,33 @@ class DomainRequest(TimeStampedModel): email__isnull=False, phone__isnull=False, ).exists() - # Radio button is No + has rationale - or (self.has_other_contacts() is False and self.no_other_contacts_rationale is not None) - ): + ) + + def _has_no_other_contacts_gives_rationale(self): + # Other Contacts Radio button is No and a rationale is provided + return self.has_other_contacts() is False and self.no_other_contacts_rationale is not None + + def _is_other_contacts_complete(self): + if self._has_other_contacts_and_filled() or self._has_no_other_contacts_gives_rationale(): return True return False - def _is_additional_details_complete(self): - # has_cisa_representative is True and the cisa_representative_email is not empty and is not an empty string - # OR has_cisa_representative is No - # AND - # the anything else boolean is True and there is text and it's not an empty string of text OR the boolean is No + def _cisa_rep_and_email_check(self): + # Has a CISA rep + email is NOT empty or NOT an empty string OR doesn't have CISA rep return ( - ( - self.has_cisa_representative is True - and self.cisa_representative_email is not None - and self.cisa_representative_email != "" - ) - or self.has_cisa_representative is False - ) and ( - (self.has_anything_else_text is True and self.anything_else is not None and self.anything_else != "") - or self.has_anything_else_text is False - ) + self.has_cisa_representative is True + and self.cisa_representative_email is not None + and self.cisa_representative_email != "" + ) or self.has_cisa_representative is False + + def _anything_else_radio_button_and_text_field_check(self): + # Anything else boolean is True + filled text field and it's not an empty string OR the boolean is No + return ( + self.has_anything_else_text is True and self.anything_else is not None and self.anything_else != "" + ) or self.has_anything_else_text is False + + def _is_additional_details_complete(self): + return self._cisa_rep_and_email_check() and self._anything_else_radio_button_and_text_field_check() def _is_policy_acknowledgement_complete(self): return self.is_policy_acknowledged is not None @@ -1038,23 +1043,24 @@ class DomainRequest(TimeStampedModel): ) def _form_complete(self): - if self.generic_org_type == DomainRequest.OrganizationChoices.FEDERAL: - is_complete = self._is_federal_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.INTERSTATE: - is_complete = self._is_interstate_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.STATE_OR_TERRITORY: - is_complete = self._is_state_or_territory_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.TRIBAL: - is_complete = self._is_tribal_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.COUNTY: - is_complete = self._is_county_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.CITY: - is_complete = self._is_city_complete() - elif self.generic_org_type == DomainRequest.OrganizationChoices.SPECIAL_DISTRICT: - is_complete = self._is_special_district_complete() - else: - # NOTE: This shouldn't happen, this is only if somehow they didn't choose an org type - is_complete = False + match self.generic_org_type: + case DomainRequest.OrganizationChoices.FEDERAL: + is_complete = self._is_federal_complete() + case DomainRequest.OrganizationChoices.INTERSTATE: + is_complete = self._is_interstate_complete() + case DomainRequest.OrganizationChoices.STATE_OR_TERRITORY: + is_complete = self._is_state_or_territory_complete() + case DomainRequest.OrganizationChoices.TRIBAL: + is_complete = self._is_tribal_complete() + case DomainRequest.OrganizationChoices.COUNTY: + is_complete = self._is_county_complete() + case DomainRequest.OrganizationChoices.CITY: + is_complete = self._is_city_complete() + case DomainRequest.OrganizationChoices.SPECIAL_DISTRICT: + is_complete = self._is_special_district_complete() + case _: + # NOTE: Shouldn't happen, this is only if somehow they didn't choose an org type + is_complete = False if not is_complete or not self._is_general_form_complete(): return False diff --git a/src/registrar/templates/domain_request_intro.html b/src/registrar/templates/domain_request_intro.html index 72abe6a27..d6d3b3b7f 100644 --- a/src/registrar/templates/domain_request_intro.html +++ b/src/registrar/templates/domain_request_intro.html @@ -14,6 +14,11 @@
If you have all the information you need, completing your domain request might take around 15 minutes.
+ {% if has_profile_feature_flag %} +While reviewing your domain request, we may need to reach out with questions. We’ll also email you when we complete our review If the contact information below is not correct, visit your profile to make updates.
+ {% include "includes/profile_information.html" with user=user%} + {% endif %} {% block form_buttons %} diff --git a/src/registrar/templates/domain_request_status.html b/src/registrar/templates/domain_request_status.html index 0ea16e3a3..ac447476d 100644 --- a/src/registrar/templates/domain_request_status.html +++ b/src/registrar/templates/domain_request_status.html @@ -106,7 +106,7 @@ {% include "includes/summary_item.html" with title='Purpose of your domain' value=DomainRequest.purpose heading_level=heading_level %} {% endif %} - {% if DomainRequest.submitter %} + {% if DomainRequest.submitter and not has_profile_feature_flag %} {% include "includes/summary_item.html" with title='Your contact information' value=DomainRequest.submitter contact='true' heading_level=heading_level %} {% endif %} diff --git a/src/registrar/templates/includes/profile_information.html b/src/registrar/templates/includes/profile_information.html new file mode 100644 index 000000000..2922fd3f7 --- /dev/null +++ b/src/registrar/templates/includes/profile_information.html @@ -0,0 +1,25 @@ +{% load static field_helpers %} + +{% block domain_content %} + +