templates: add variables to overload submit button name and value and to remove cancel button

This commit is contained in:
Benjamin Dauvergne 2014-01-07 11:48:03 +01:00
parent e5e19d48d9
commit 6634b6481b
1 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,9 @@
{% csrf_token %}
{% include "portail_citoyen/form_fields.html" with form=form %}
<input type="submit" value="{% trans 'Submit' %}" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
<input type="submit" {% if submit_name %}name="{{ submit_name }}"{% endif %}
value="{% if submit_value %}{{ submit_value }}{% else %}{% trans 'Submit' %}{% endif %}" />
{% if not no_cancel_button %}
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
{% endif %}
</form>