Add map delete button

This commit is contained in:
Yohan Boniface 2012-12-21 00:46:13 +01:00
parent d328f381e9
commit 47f683214f

View file

@ -1,5 +1,7 @@
{% load youmap_tags %} {% load youmap_tags %}
{% if not map %}
<h3>Create your map now!</h3> <h3>Create your map now!</h3>
{% endif %}
<form action="{{ action_url }}" method="post" id="map_edit"> <form action="{{ action_url }}" method="post" id="map_edit">
{% for error in form.non_field_errors %} {% for error in form.non_field_errors %}
<small class="error">{{ error }}</small> <small class="error">{{ error }}</small>
@ -11,4 +13,7 @@
{{ form.zoom }} {{ form.zoom }}
{{ form.center }} {{ form.center }}
<input type="submit" class="button" /> <input type="submit" class="button" />
{% if delete_url and map and user == map.owner %}
<a href="{{ delete_url }}" id="delete_map_button" >Delete</a>
{% endif %}
</form> </form>