Correctly display action on Create/Update templates

This commit is contained in:
Jens Langhammer 2019-02-25 16:40:46 +01:00
parent 408e205c5f
commit c2756f15fc
3 changed files with 11 additions and 3 deletions

View file

@ -4,4 +4,8 @@
{% block above_form %} {% block above_form %}
<h1>{% trans 'Create' %}</h1> <h1>{% trans 'Create' %}</h1>
{% endblock %} {% endblock %}
{% block action %}
{% trans 'Create' %}
{% endblock %}

View file

@ -11,7 +11,7 @@
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% include 'partials/form.html' with form=form %} {% include 'partials/form.html' with form=form %}
<a class="btn btn-default" href="{% back %}">{% trans "Cancel" %}</a> <a class="btn btn-default" href="{% back %}">{% trans "Cancel" %}</a>
<input type="submit" class="btn btn-primary" value="{% trans 'Create' %}" /> <input type="submit" class="btn btn-primary" value="{% block action %}{% endblock %}" />
</form> </form>
</div> </div>
</div> </div>

View file

@ -4,4 +4,8 @@
{% block above_form %} {% block above_form %}
<h1>{% trans 'Update' %}</h1> <h1>{% trans 'Update' %}</h1>
{% endblock %} {% endblock %}
{% block action %}
{% trans 'Update' %}
{% endblock %}