diff options
Diffstat (limited to 'templates/edit.html')
-rw-r--r-- | templates/edit.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/templates/edit.html b/templates/edit.html new file mode 100644 index 0000000..9d3ee8c --- /dev/null +++ b/templates/edit.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% load i18n %} +{% block sidebar %} +{% endblock %} + +{% block content %} +{% 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='/chimere/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%} + {{form.point}} +</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' value="{% trans 'Propose'%}"/></p> +</form> +</fieldset> +{% endblock %} |