Skip to content

Commit

Permalink
Merge pull request #2173 from cisagov/nl/2055-registrar-user-contact-…
Browse files Browse the repository at this point in the history
…preamble

Issue #2055 - registrar user contact info preamble
  • Loading branch information
CocoByte authored May 29, 2024
2 parents 85fe89a + 1d0fdfc commit bf1d5fa
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/registrar/assets/sass/_theme/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}
5 changes: 5 additions & 0 deletions src/registrar/templates/domain_request_intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ <h1>You’re about to start your .gov domain request.</h1>
<h2>Time to complete the form</h2>
<p>If you have <a href="{% public_site_url 'domains/before/#information-you%E2%80%99ll-need-to-complete-the-domain-request-form' %}" target="_blank" class="usa-link">all the information you need</a>,
completing your domain request might take around 15 minutes.</p>
{% if has_profile_feature_flag %}
<h2>How we’ll reach you</h2>
<p>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 <a href="" target="_blank" class="usa-link">your profile</a> to make updates.</p>
{% include "includes/profile_information.html" with user=user%}
{% endif %}


{% block form_buttons %}
Expand Down
25 changes: 25 additions & 0 deletions src/registrar/templates/includes/profile_information.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% load static field_helpers %}

{% block domain_content %}

<div
class="usa-summary-box"
role="region"
aria-labelledby="summary-box-key-information"
>
<div class="usa-summary-box__body">
<h3 class="usa-summary-box__heading" id="summary-box-key-information">
Your contact information
</h3>
<div class="usa-summary-box__text">
<ul>
<li>Full name: <b>{{ user.contact.get_formatted_name }}</b></li>
<li>Organization email: <b>{{ user.email }}</b></li>
<li>Title or role in your organization: <b>{{ user.contact.title }}</b></li>
<li>Phone: <b>{{ user.contact.phone.as_national }}</b></li>
</ul>
</div>
</div>
</div>

{% endblock %}
13 changes: 10 additions & 3 deletions src/registrar/views/domain_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ def get(self, request, *args, **kwargs):
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)

Expand Down Expand Up @@ -386,16 +387,22 @@ def get_context_data(self):
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
"visited": self.storage.get("step_history", []),
"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."""
Expand Down

0 comments on commit bf1d5fa

Please sign in to comment.