-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support view support for task workflow deletion (#1329)
- Loading branch information
1 parent
01db672
commit baf7f61
Showing
7 changed files
with
223 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
tasks/jinja2/tasks/workflows/task_template_confirm_delete.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% extends "layouts/confirm.jinja" %} | ||
|
||
{% from "components/breadcrumbs/macro.njk" import govukBreadcrumbs %} | ||
{% from "components/panel/macro.njk" import govukPanel %} | ||
{% from "components/button/macro.njk" import govukButton %} | ||
|
||
{% set page_title = "Task template deleted" %} | ||
|
||
|
||
{% block breadcrumb %} | ||
{{ breadcrumbs( | ||
request, | ||
[ | ||
{"text": "Find and view workflow templates", "href": "#TODO"}, | ||
{ | ||
"text": "Workflow template: " ~ task_workflow_template.title, | ||
"href": url( | ||
"workflow:task-workflow-template-ui-detail", | ||
kwargs={"pk": task_workflow_template.pk}, | ||
), | ||
}, | ||
{"text": page_title} | ||
], | ||
False, | ||
) }} | ||
{% endblock %} | ||
|
||
{% block panel %} | ||
{{ govukPanel({ | ||
"titleText": "Task template ID: " ~ deleted_pk, | ||
"text": "Task template has been deleted", | ||
"classes": "govuk-!-margin-bottom-7" | ||
}) }} | ||
{% endblock %} | ||
|
||
{% block button_group %} | ||
{{ govukButton({ | ||
"text": "View workflow template", | ||
"href": url( | ||
"workflow:task-workflow-template-ui-detail", | ||
kwargs={"pk": task_workflow_template.pk}, | ||
), | ||
"classes": "govuk-button" | ||
}) }} | ||
{{ govukButton({ | ||
"text": "Return to homepage", | ||
"href": url("home"), | ||
"classes": "govuk-button--secondary" | ||
}) }} | ||
{% endblock %} | ||
|
||
{% block actions %} | ||
<li> | ||
<a class="govuk-link" | ||
href="{{ url('workflow:task-template-ui-create', kwargs={'workflow_template_pk': task_workflow_template.pk}) }}" | ||
>Create a task template</a> | ||
</li> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% extends "common/delete.jinja" %} | ||
|
||
{% from "components/breadcrumbs.jinja" import breadcrumbs %} | ||
{% from "components/warning-text/macro.njk" import govukWarningText %} | ||
{% from "components/button/macro.njk" import govukButton %} | ||
|
||
{% set page_title = "Delete task template:" ~ object.title %} | ||
|
||
|
||
{% block breadcrumb %} | ||
{{ breadcrumbs( | ||
request, | ||
[ | ||
{"text": "Find and view workflow templates", "href": "#TODO"}, | ||
{ | ||
"text": "Workflow template: " ~ task_workflow_template.title, | ||
"href": url("workflow:task-workflow-template-ui-detail", kwargs={"pk": task_workflow_template.pk}), | ||
}, | ||
{"text": page_title} | ||
], | ||
False, | ||
) }} | ||
{% endblock %} | ||
|
||
{% block form %} | ||
{{ govukWarningText({ | ||
"text": "Are you sure you want to delete this task template?" | ||
}) }} | ||
|
||
{% call django_form( | ||
action=url( | ||
"workflow:task-template-ui-delete", | ||
kwargs={ | ||
"workflow_template_pk": task_workflow_template.pk, | ||
"pk": object.pk, | ||
}), | ||
) %} | ||
{{ crispy(form) }} | ||
{% endcall %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters