mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 10:16:13 +02:00
Allow making subsequent requests in org model
This commit is contained in:
parent
60ed2fd0a5
commit
53ea0c2cc6
1 changed files with 3 additions and 15 deletions
|
@ -326,7 +326,7 @@ class DomainRequestWizard(TemplateView):
|
|||
# if pending requests exist and user does not have approved domains,
|
||||
# present message that domain request cannot be submitted
|
||||
pending_requests = self.pending_requests()
|
||||
if len(pending_requests) > 0:
|
||||
if len(pending_requests) > 0 and not flag_is_active_for_user(self.request.user, "organization_feature"):
|
||||
message_header = "You cannot submit this request yet"
|
||||
message_content = (
|
||||
f"<h4 class='usa-alert__heading'>{message_header}</h4> "
|
||||
|
@ -625,11 +625,6 @@ class PortfolioAdditionalDetails(DomainRequestWizard):
|
|||
2: FEBAnythingElseYesNoForm
|
||||
3: PortfolioAnythingElseForm
|
||||
"""
|
||||
if not self.requires_feb_questions():
|
||||
for i in range(3):
|
||||
forms[i].mark_form_for_deletion()
|
||||
# If FEB questions aren't required, validate only the anything else form
|
||||
return forms[3].is_valid()
|
||||
eop_forms_valid = True
|
||||
if not forms[0].is_valid():
|
||||
# If the user isn't working with EOP, don't validate the EOP contact form
|
||||
|
@ -797,11 +792,11 @@ class Purpose(DomainRequestWizard):
|
|||
option = feb_purpose_options_form.cleaned_data.get("feb_purpose_choice")
|
||||
if option == "new":
|
||||
purpose_details_form.fields["purpose"].error_messages = {
|
||||
"required": "Provide details on why a new domain is required."
|
||||
"required": "Explain why a new domain is required."
|
||||
}
|
||||
elif option == "redirect":
|
||||
purpose_details_form.fields["purpose"].error_messages = {
|
||||
"required": "Provide details on why a redirect is necessary."
|
||||
"required": "Explain why a redirect is needed."
|
||||
}
|
||||
elif option == "other":
|
||||
purpose_details_form.fields["purpose"].error_messages = {
|
||||
|
@ -970,9 +965,6 @@ class Review(DomainRequestWizard):
|
|||
context["Step"] = self.get_step_enum().__members__
|
||||
context["domain_request"] = self.domain_request
|
||||
context["requires_feb_questions"] = self.requires_feb_questions()
|
||||
context["purpose_label"] = DomainRequest.FEBPurposeChoices.get_purpose_label(
|
||||
self.domain_request.feb_purpose_choice
|
||||
)
|
||||
return context
|
||||
|
||||
def goto_next_step(self):
|
||||
|
@ -1186,10 +1178,6 @@ class PortfolioDomainRequestStatusViewOnly(DetailView):
|
|||
context["Step"] = PortfolioDomainRequestStep.__members__
|
||||
context["steps"] = request_step_list(wizard, PortfolioDomainRequestStep)
|
||||
context["form_titles"] = wizard.titles
|
||||
context["requires_feb_questions"] = self.object.is_feb() and flag_is_active_for_user(
|
||||
self.request.user, "organization_feature"
|
||||
)
|
||||
context["purpose_label"] = DomainRequest.FEBPurposeChoices.get_purpose_label(self.object.feb_purpose_choice)
|
||||
return context
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue