Skip to content

Commit 122a89a

Browse files
committed
Update wizard_step template with form override
Make it so that any template extending wizard_step can override the form rendered at the bottom of the page. We'll need this as we transition from the existing design of the appointment pages to the workflow design that currently exists in the prototype.
1 parent be51761 commit 122a89a

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

manage_breast_screening/core/jinja2/wizard_step.jinja

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,27 @@
3131

3232
{% block step_content %}{% endblock %}
3333

34-
{% if form %}
35-
<form action="{{request.path}}" method="POST">
36-
<div class="nhsuk-grid-row">
37-
<div class="nhsuk-grid-column-two-thirds">
38-
{% block form %}{% endblock form %}
39-
40-
{% if form.decision %}
41-
{{ form.decision.as_field_group() }}
42-
{% endif %}
43-
44-
{{ button({
45-
"text": "Continue"
46-
}) }}
47-
48-
{{csrf_input}}
49-
</div>
50-
</div>
51-
</form>
52-
{% endif %}
34+
{% block wizard_form %}
35+
{% if form %}
36+
<form action="{{request.path}}" method="POST">
37+
<div class="nhsuk-grid-row">
38+
<div class="nhsuk-grid-column-two-thirds">
39+
{% block form %}{% endblock form %}
40+
41+
{% if form.decision %}
42+
{{ form.decision.as_field_group() }}
43+
{% endif %}
44+
45+
{{ button({
46+
"text": "Continue"
47+
}) }}
48+
49+
{{csrf_input}}
50+
</div>
51+
</div>
52+
</form>
53+
{% endif %}
54+
{% endblock wizard_form %}
5355

5456
{% if cannot_continue_link %}
5557
<p><a class="nhsuk-link nhsuk-link--no-visited-state" href="{{ cannot_continue_link.href }}">{{ cannot_continue_link.text }}</a></p>

0 commit comments

Comments
 (0)