Add map delete button
This commit is contained in:
parent
d328f381e9
commit
47f683214f
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
{% load youmap_tags %}
|
{% load youmap_tags %}
|
||||||
<h3>Create your map now!</h3>
|
{% if not map %}
|
||||||
|
<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>
|
Loading…
Reference in a new issue