mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
Merge branch 'main' into za/2047-force-new-users-profile
This commit is contained in:
commit
a76b28442f
5 changed files with 63 additions and 6 deletions
|
@ -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};
|
||||
}
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
<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 %}
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
|
|
25
src/registrar/templates/includes/profile_information.html
Normal file
25
src/registrar/templates/includes/profile_information.html
Normal file
|
@ -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 %}
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue