{% load i18n %}
<div class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/>{% endif %}
{% if show_delete_link %}
	<p class="deletelink-box"><a href="delete/" class="deletelink">{% trans "Delete" %}</a>
	{% if show_delete_translation %}
		<a href="delete-translation/?language={{ language }}" class="deletelink deletetranslation">{% blocktrans with language_name as language %}Delete {{ language }} translation{% endblocktrans %}</a>
	{% endif %}
	</p>
{% endif %}
{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%}
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %}
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %}
</div>
<script type="text/javascript">
(function ($) {
	var i = 0;
	$('form').submit(function () {
		i++; if(i > 1) { return false; }
	});
})(jQuery);
</script>