mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 04:59:59 +02:00
Cleanup
This commit is contained in:
parent
7aabc92ef8
commit
03afa329c5
2 changed files with 14 additions and 1 deletions
|
@ -59,7 +59,7 @@ class TestWithUser(MockEppLib):
|
||||||
self.user = get_user_model().objects.create(
|
self.user = get_user_model().objects.create(
|
||||||
username=username, first_name=first_name, last_name=last_name, email=email, phone=phone
|
username=username, first_name=first_name, last_name=last_name, email=email, phone=phone
|
||||||
)
|
)
|
||||||
title="test title"
|
title = "test title"
|
||||||
self.user.contact.title = title
|
self.user.contact.title = title
|
||||||
self.user.save()
|
self.user.save()
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ from registrar.models.user import User
|
||||||
from registrar.utility import StrEnum
|
from registrar.utility import StrEnum
|
||||||
from registrar.views.utility import StepsHelper
|
from registrar.views.utility import StepsHelper
|
||||||
from registrar.views.utility.permission_views import DomainRequestPermissionDeleteView
|
from registrar.views.utility.permission_views import DomainRequestPermissionDeleteView
|
||||||
|
from waffle.decorators import flag_is_active, waffle_flag
|
||||||
|
|
||||||
from .utility import (
|
from .utility import (
|
||||||
DomainRequestPermissionView,
|
DomainRequestPermissionView,
|
||||||
|
@ -400,7 +401,15 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
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."""
|
||||||
step_list = []
|
step_list = []
|
||||||
|
excluded_steps = [
|
||||||
|
Step.YOUR_CONTACT
|
||||||
|
]
|
||||||
|
should_exclude = flag_is_active(self.request, "profile_feature")
|
||||||
for step in Step:
|
for step in Step:
|
||||||
|
|
||||||
|
if should_exclude and step in excluded_steps:
|
||||||
|
continue
|
||||||
|
|
||||||
condition = self.WIZARD_CONDITIONS.get(step, True)
|
condition = self.WIZARD_CONDITIONS.get(step, True)
|
||||||
if callable(condition):
|
if callable(condition):
|
||||||
condition = condition(self)
|
condition = condition(self)
|
||||||
|
@ -540,6 +549,10 @@ class YourContact(DomainRequestWizard):
|
||||||
template_name = "domain_request_your_contact.html"
|
template_name = "domain_request_your_contact.html"
|
||||||
forms = [forms.YourContactForm]
|
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):
|
class OtherContacts(DomainRequestWizard):
|
||||||
template_name = "domain_request_other_contacts.html"
|
template_name = "domain_request_other_contacts.html"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue