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>, <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> completing your domain request might take around 15 minutes.</p>
{% if has_profile_feature_flag %} {% if has_profile_feature_flag == true %}
<h2>How we'll reach you</h2> <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> <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%} {% include "includes/profile_information.html" with user=user%}
{% endif %} {% endif %}

View file

@ -229,10 +229,10 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
# know which view is first in the list of steps. # know which view is first in the list of steps.
if self.__class__ == DomainRequestWizard: if self.__class__ == DomainRequestWizard:
if request.path_info == self.NEW_URL_NAME: if request.path_info == self.NEW_URL_NAME:
user = self.request.user
context = self.get_context_data() context = self.get_context_data()
context["user"] = user has_prof = flag_is_active(self.request, "profile_feature")
context["has_profile_feature_flag"] = flag_is_active(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") return render(request, "domain_request_intro.html")
else: else:
return self.goto(self.steps.first) return self.goto(self.steps.first)
@ -390,7 +390,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
else: else:
modal_heading = "You are about to submit an incomplete request" modal_heading = "You are about to submit an incomplete request"
return { context = {
"form_titles": self.TITLES, "form_titles": self.TITLES,
"steps": self.steps, "steps": self.steps,
# Add information about which steps should be unlocked # Add information about which steps should be unlocked
@ -398,7 +398,11 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
"is_federal": self.domain_request.is_federal(), "is_federal": self.domain_request.is_federal(),
"modal_button": modal_button, "modal_button": modal_button,
"modal_heading": modal_heading, "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: def get_step_list(self) -> list:
"""Dynamically generated list of steps in the form wizard.""" """Dynamically generated list of steps in the form wizard."""