editor: fix title of mapitem edit view

This commit is contained in:
Laura Klünder 2016-12-01 12:42:51 +01:00
parent a42e6a2a23
commit 1ff1a35ce8
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{% load bootstrap3 %}
<h3>{% if new %}New{% else %}Edit{% endif %} {{ mapitem_type.title }}</h3>
<h3>{% if new %}New{% else %}Edit{% endif %} {{ title }}</h3>
<form action="{{ path }}" method="post" data-mapitem-type="{{ mapitem_type }}"{% if new %} data-new{% endif %}{% if not new %} data-name="{{ name }}"{% elif geomtype %} data-geomtype="{{ geomtype }}"{% endif %}>
{% csrf_token %}
{% bootstrap_form form %}

View file

@ -149,6 +149,7 @@ def edit_mapitem(request, mapitem_type, name=None):
return render(request, 'editor/mapitem.html', {
'form': form,
'mapitem_type': mapitem_type,
'title': mapitemtype._meta.verbose_name,
'has_geometry': hasattr(mapitemtype, 'geometry'),
'name': orig_name,
'geomtype': getattr(mapitemtype, 'geomtype', None),