summaryrefslogtreecommitdiff
path: root/chimere/templates/edit.html
blob: 0e1f6d7963bc418f5238f90b8186f547ee0013d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "base_user.html" %}
{% load i18n %}
{% block message_map %}{% endblock %}
{% block message_edit%}<div id='content'>{{block.super}}{% endblock %}

{% block content %}{{ block.super }}
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<fieldset class='edit'>
<legend>{% trans "Add a new site" %}</legend>
<p>* {% trans "indicates a mandatory field" %}</p>
<form enctype="multipart/form-data" method='post' action='{{extra_url}}edit/'>
<div class="fieldWrapper">
    <label for="id_name">{% trans "Site name"%} *</label>
    {{ form.name.errors }}
    {{ form.name }}
</div>
<div class="fieldWrapper">
  <label for="id_subcategory">{% trans "Category" %} *</label>
  {{ form.subcategory.errors }}
  <select name='subcategory' id='subcategory'>
    <option value="">---------</option>
    {% for cat_subcat in sub_categories %}
    <optgroup label="{{cat_subcat.0.name}}">
      {% for sub_category in cat_subcat.1 %}
      <option value='{{sub_category.id}}'{% ifequal sub_category.id current_category %} selected='selected'{% endifequal %}>
      {% trans sub_category.name %}
      </option>{% endfor %}
    </optgroup>{% endfor %}
  </select>
</div>
<div class="fieldWrapper">
    <label for="id_point">{% trans "Point"%} *</label>
    {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
    {{point_widget}}
</div>
<div class="fieldWrapper">
    <label for="id_picture">{% trans "Image" %}</label>
    {{ form.picture.errors }}
    {{ form.picture }}
</div>
{%for field in form%}{%for property in properties%}{%ifequal field.name property%}
<div class="fieldWrapper">
    <label for="id_{{field.name}}">{% trans field.label %}</label>
    {{ field.errors }}
    {{ field }}
</div>
{%endifequal%}{%endfor%}{%endfor%}
<p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
</form>
</fieldset>
</div>
{% endblock %}