mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
[feat] Add reusable templates to generate forms
This commit is contained in:
parent
d6c787fc51
commit
2b09a653d1
@ -0,0 +1,6 @@
|
||||
<form action="{{ submit_url }}" method="POST">
|
||||
{% csrf_token %}
|
||||
{% block form_fields %}{% endblock form_fields %}
|
||||
<input type="submit" value="{{ action_button_text }}" class="button {{ action_button_class }}" />
|
||||
<a href="{{ next }}" class="button button-secondary">{{ no_action_button_text }}</a>
|
||||
</form>
|
@ -0,0 +1,9 @@
|
||||
{% extends './form.html' %}
|
||||
|
||||
{% block form_fields %}
|
||||
<ul class="fields">
|
||||
{% for field in form %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=field %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock form_fields %}
|
@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
<a href="{{ next }}" class="button button-secondary">{% trans "Go back" %}</a>
|
Loading…
Reference in New Issue
Block a user