Fixed profile flag

This commit is contained in:
CocoByte 2024-05-15 15:53:54 -06:00
parent b3802f4e2c
commit fa2d6a1387
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
2 changed files with 12 additions and 8 deletions

View file

@ -15,10 +15,10 @@
<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%}
{% if has_profile_feature_flag == true %}
<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 %}

View file

@ -229,10 +229,10 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
# know which view is first in the list of steps.
if self.__class__ == DomainRequestWizard:
if request.path_info == self.NEW_URL_NAME:
user = self.request.user
context = self.get_context_data()
context["user"] = user
context["has_profile_feature_flag"] = flag_is_active(request, "profile_feature")
has_prof = flag_is_active(self.request, "profile_feature")
context["has_profile_feature_flag"] = has_prof
logger.debug("PROFILE FLAG is %s" % has_prof)
return render(request, "domain_request_intro.html")
else:
return self.goto(self.steps.first)
@ -390,7 +390,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
else:
modal_heading = "You are about to submit an incomplete request"
return {
context = {
"form_titles": self.TITLES,
"steps": self.steps,
# Add information about which steps should be unlocked
@ -398,7 +398,11 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
"is_federal": self.domain_request.is_federal(),
"modal_button": modal_button,
"modal_heading": modal_heading,
#Use the profile waffle feature flag to toggle profile features throughout domain requests
"has_profile_feature_flag": flag_is_active(self.request, "profile_feature"),
"user": self.request.user
}
return context
def get_step_list(self) -> list:
"""Dynamically generated list of steps in the form wizard."""