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/templates/domain_request_intro.html b/src/registrar/templates/domain_request_intro.html index c0b566799..d6d3b3b7f 100644 --- a/src/registrar/templates/domain_request_intro.html +++ b/src/registrar/templates/domain_request_intro.html @@ -14,7 +14,12 @@

Time to complete the form

If you have all the information you need, completing your domain request might take around 15 minutes.

- + {% if has_profile_feature_flag %} +

How we’ll reach you

+

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 %} + +
+
+

+ Your contact information +

+
+
    +
  • Full name: {{ user.contact.get_formatted_name }}
  • +
  • Organization email: {{ user.email }}
  • +
  • Title or role in your organization: {{ user.contact.title }}
  • +
  • Phone: {{ user.contact.phone.as_national }}
  • +
+
+
+
+ +{% endblock %} diff --git a/src/registrar/views/domain_request.py b/src/registrar/views/domain_request.py index a90eaf271..296b8c0e5 100644 --- a/src/registrar/views/domain_request.py +++ b/src/registrar/views/domain_request.py @@ -22,7 +22,7 @@ from .utility import ( DomainRequestWizardPermissionView, ) -from waffle.decorators import flag_is_active +from waffle.decorators import flag_is_active, waffle_flag logger = logging.getLogger(__name__) @@ -230,7 +230,8 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): context = self.get_context_data() if self.__class__ == DomainRequestWizard: if request.path_info == self.NEW_URL_NAME: - return render(request, "domain_request_intro.html", context) + context = self.get_context_data() + return render(request, "domain_request_intro.html", context=context) else: return self.goto(self.steps.first) @@ -386,7 +387,10 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): else: modal_heading = "You are about to submit an incomplete request" - return { + has_profile_flag = flag_is_active(self.request, "profile_feature") + logger.debug("PROFILE FLAG is %s" % has_profile_flag) + + context = { "form_titles": self.TITLES, "steps": self.steps, # Add information about which steps should be unlocked @@ -394,8 +398,11 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): "is_federal": self.domain_request.is_federal(), "modal_button": modal_button, "modal_heading": modal_heading, - "has_profile_feature_flag": flag_is_active(self.request, "profile_feature"), + # Use the profile waffle feature flag to toggle profile features throughout domain requests + "has_profile_feature_flag": has_profile_flag, + "user": self.request.user, } + return context def get_step_list(self) -> list: """Dynamically generated list of steps in the form wizard.""" @@ -406,6 +413,10 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView): condition = condition(self) if condition: step_list.append(step) + + if flag_is_active(self.request, "profile_feature"): + step_list.remove(Step.YOUR_CONTACT) + return step_list def goto(self, step): @@ -540,6 +551,10 @@ class YourContact(DomainRequestWizard): template_name = "domain_request_your_contact.html" forms = [forms.YourContactForm] + @waffle_flag("!profile_feature") # type: ignore + def dispatch(self, request, *args, **kwargs): # type: ignore + return super().dispatch(request, *args, **kwargs) + class OtherContacts(DomainRequestWizard): template_name = "domain_request_other_contacts.html"