mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 17:28:31 +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(
|
||||
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.save()
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ from registrar.models.user import User
|
|||
from registrar.utility import StrEnum
|
||||
from registrar.views.utility import StepsHelper
|
||||
from registrar.views.utility.permission_views import DomainRequestPermissionDeleteView
|
||||
from waffle.decorators import flag_is_active, waffle_flag
|
||||
|
||||
from .utility import (
|
||||
DomainRequestPermissionView,
|
||||
|
@ -400,7 +401,15 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
|||
def get_step_list(self) -> list:
|
||||
"""Dynamically generated list of steps in the form wizard."""
|
||||
step_list = []
|
||||
excluded_steps = [
|
||||
Step.YOUR_CONTACT
|
||||
]
|
||||
should_exclude = flag_is_active(self.request, "profile_feature")
|
||||
for step in Step:
|
||||
|
||||
if should_exclude and step in excluded_steps:
|
||||
continue
|
||||
|
||||
condition = self.WIZARD_CONDITIONS.get(step, True)
|
||||
if callable(condition):
|
||||
condition = condition(self)
|
||||
|
@ -540,6 +549,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