Move is_federal to base class

This commit is contained in:
igorkorenfeld 2023-01-23 16:50:13 -05:00
parent 3be3dddbbc
commit fc59e0b9cf
No known key found for this signature in database
GPG key ID: 826947A4B867F659

View file

@ -264,6 +264,7 @@ class ApplicationWizard(LoginRequiredMixin, TemplateView):
"steps": self.steps,
# Add information about which steps should be unlocked
"visited": self.storage.get("step_history", []),
"is_federal": self.application.is_federal(),
}
def get_step_list(self) -> list:
@ -350,11 +351,6 @@ class OrganizationContact(ApplicationWizard):
template_name = "application_org_contact.html"
forms = [forms.OrganizationContactForm]
def get_context_data(self):
context = super().get_context_data()
context["is_federal"] = self.application.is_federal()
return context
class TypeOfWork(ApplicationWizard):
template_name = "application_type_of_work.html"
@ -367,7 +363,6 @@ class AuthorizingOfficial(ApplicationWizard):
def get_context_data(self):
context = super().get_context_data()
context["is_federal"] = self.application.is_federal()
context["organization_type"] = self.application.organization_type
context["federal_type"] = self.application.federal_type
return context
@ -382,6 +377,12 @@ class DotgovDomain(ApplicationWizard):
template_name = "application_dotgov_domain.html"
forms = [forms.DotGovDomainForm]
def get_context_data(self):
context = super().get_context_data()
context["organization_type"] = self.application.organization_type
context["federal_type"] = self.application.federal_type
return context
class Purpose(ApplicationWizard):
template_name = "application_purpose.html"