def delete_document_confirmation_form(overview_url, strings): return confirm_form( title=DeletePartyDocumentForm.TITLE, confirmation_name="delete_document_confirmation", back_link_text=strings.BACK, back_url=overview_url, )
def party_create_new_or_copy_existing_form(application_id, back_url): return confirm_form( title=PartyForm.CopyExistingForm.TITLE, confirmation_name="copy_existing", yes_label=PartyForm.CopyExistingForm.YES, no_label=PartyForm.CopyExistingForm.NO, back_link_text=PartyForm.CopyExistingForm.BACK_LINK, back_url=back_url, submit_button_text=PartyForm.CopyExistingForm.BUTTON, )
def ecju_query_respond_confirmation_form(edit_response_url): return confirm_form( title=ecju_queries.Forms.ConfirmResponseForm.TITLE, confirmation_name="confirm_response", hidden_field="ecju_query_response_confirmation", yes_label=ecju_queries.Forms.ConfirmResponseForm.YES_LABEL, no_label=ecju_queries.Forms.ConfirmResponseForm.NO_LABEL, back_link_text=ecju_queries.Forms.ConfirmResponseForm.BACK_LINK, back_url=edit_response_url, submit_button_text=ecju_queries.Forms.ConfirmResponseForm.SUBMIT_BTN, )
def deactivate_or_activate_flagging_rule_form(title, description, confirm_text, status): return confirm_form( title=title, description=description, back_link_text=strings.FlaggingRules.Status.BACK, back_url=reverse_lazy("flags:flagging_rules"), yes_label=confirm_text, no_label=strings.FlaggingRules.Status.CANCEL, hidden_field=status, confirmation_name="confirm", )
def rerun_routing_rules_confirmation_form(): return confirm_form( title=Manage.RerunRoutingRules.TITLE, confirmation_name="confirm", back_link_text=Manage.RerunRoutingRules.BACKLINK, back_url="#", yes_label=Manage.RerunRoutingRules.YES, no_label=Manage.RerunRoutingRules.NO, submit_button_text=Manage.RerunRoutingRules.SUBMIT_BUTTON, container="case", )
def party_create_new_or_copy_existing_form(application_id): return confirm_form( title=PartyForm.CopyExistingForm.TITLE, confirmation_name="copy_existing", yes_label=PartyForm.CopyExistingForm.YES, no_label=PartyForm.CopyExistingForm.NO, back_link_text=PartyForm.CopyExistingForm.BACK_LINK, back_url=reverse_lazy("applications:task_list", kwargs={"pk": application_id}), submit_button_text=PartyForm.CopyExistingForm.BUTTON, )
def withdraw_application_confirmation(application, pk): return confirm_form( title=strings.applications.ApplicationSummaryPage.Withdraw.TITLE, confirmation_name="choice", summary=application_summary(application), back_link_text=strings.applications.ApplicationSummaryPage.Withdraw.BACK_TEXT, yes_label=strings.applications.ApplicationSummaryPage.Withdraw.YES_LABEL, no_label=strings.applications.ApplicationSummaryPage.Withdraw.NO_LABEL, submit_button_text=strings.applications.ApplicationSummaryPage.Withdraw.SUBMIT_BUTTON, back_url=reverse_lazy("applications:application", kwargs={"pk": pk}), side_by_side=True, )
def get_form(self): return confirm_form( title=self.strings.TITLE.format(self.object["name"]), description=self.strings.DESCRIPTION, back_link_text=self.strings.BACK_LINK.format(self.object["name"]), back_url=self.success_url, yes_label=self.strings.YES, no_label=self.strings.NO, side_by_side=True, submit_button_text=self.strings.SUBMIT_BUTTON, confirmation_name="response", )
def init(self, request, **kwargs): self.object_pk = kwargs["pk"] application = get_application(request, self.object_pk) self.form = confirm_form( title=strings.applications.DeleteApplicationPage.TITLE, confirmation_name="choice", summary=draft_summary(application), back_link_text=strings.applications.DeleteApplicationPage.BACK_TEXT, yes_label=strings.applications.DeleteApplicationPage.YES_LABEL, no_label=strings.applications.DeleteApplicationPage.NO_LABEL, submit_button_text=strings.applications.DeleteApplicationPage.SUBMIT_BUTTON, back_url=request.GET.get("return_to"), side_by_side=True, ) self.action = validate_delete_draft
def deactivate_or_activate_routing_rule_form(activate, status): if activate: title = ActivateForm.TITLE description = ActivateForm.DESCRIPTION yes_label = ActivateForm.YES_LABEL no_label = ActivateForm.NO_LABEL else: title = DeactivateForm.TITLE description = DeactivateForm.DESCRIPTION yes_label = DeactivateForm.YES_LABEL no_label = DeactivateForm.NO_LABEL return confirm_form( title=title, description=description, back_link_text=Forms.BACK_BUTTON, back_url=reverse_lazy("routing_rules:list"), yes_label=yes_label, no_label=no_label, hidden_field=status, confirmation_name="confirm", )