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

@ -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."""