Move 'choose a different task type' link to create_form.html

This will let us refactor to only refresh the 'create' tab on the creation-related actions.
pull/7867/head
Matt Westcott 2021-09-15 20:20:22 +01:00 zatwierdzone przez LB (Ben Johnston)
rodzic dd612b100c
commit 889ce5945a
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -13,10 +13,6 @@
{% if can_create %}
<section id="new" class="active nice-padding">
{% if createform %}
{% if task_types|length > 1 %}
<a href="{% url 'wagtailadmin_workflows:task_chooser' %}" class="choose-different-task-type">{% trans "Choose a different task type" %}</a>
{% endif %}
{% include "wagtailadmin/workflows/task_chooser/includes/create_form.html" with form=createform %}
{% else %}
{% include "wagtailadmin/workflows/task_chooser/includes/select_task_type.html" %}

Wyświetl plik

@ -3,6 +3,10 @@
{{ form.media.css }}
{{ form.media.js }}
{% if task_types|length > 1 %}
<a href="{% url 'wagtailadmin_workflows:task_chooser' %}" class="choose-different-task-type">{% trans "Choose a different task type" %}</a>
{% endif %}
<form class="task-create no-float-elements" action="{{ add_url }}" enctype="multipart/form-data" method="POST" novalidate>
{% csrf_token %}