Only add a prefix to the submit button if a form prefix has been specified

This commit is contained in:
Roberto Rosario
2011-04-22 07:35:30 -04:00
parent 024abf4efb
commit f3faf00315

View File

@@ -65,7 +65,7 @@
{% endif %}
{% if not read_only %}
<div class="group navform wat-cf">
<button class="button" type="submit" name="{{ form.prefix }}-submit">
<button class="button" type="submit" name="{% if form.prefix %}{{ form.prefix }}-submit{% else %}submit{% endif %}">
<img src="{{ MEDIA_URL }}web_theme_media/images/icons/tick.png" alt="{% if submit_label %}{{ submit_label }}{% else %}{% if object %}{% trans 'Save' %}{% else %}{% trans 'Submit' %}{% endif %}{% endif %}" /> {% if submit_label %}{{ submit_label }}{% else %}{% if object %}{% trans "Save" %}{% else %}{% trans "Submit" %}{% endif %}{% endif %}
</button>
{% comment %}