2012-09-05 00:20:28 +02:00
|
|
|
|
{% extends "base.html" %}
|
2012-02-09 16:57:10 +01:00
|
|
|
|
|
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
2012-07-13 00:44:12 +02:00
|
|
|
|
{% block title %}
|
2012-07-16 14:00:29 +02:00
|
|
|
|
{{ block.super }} –
|
2012-07-13 00:44:12 +02:00
|
|
|
|
{% if item %}
|
|
|
|
|
{{ item.title }} – {% trans "Edit item" %}
|
2012-07-13 01:10:58 +02:00
|
|
|
|
{% else %}
|
2012-07-13 00:44:12 +02:00
|
|
|
|
{% trans "New item" %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endblock %}
|
2011-07-31 10:46:29 +02:00
|
|
|
|
|
|
|
|
|
{% block content %}
|
2012-09-05 00:20:28 +02:00
|
|
|
|
<h1>
|
2012-04-27 21:36:12 +02:00
|
|
|
|
{% if item %}
|
2012-09-05 00:20:28 +02:00
|
|
|
|
{% trans "Edit item" %}
|
2012-04-27 21:36:12 +02:00
|
|
|
|
{% else %}
|
2012-09-05 00:20:28 +02:00
|
|
|
|
{% trans "New item" %}
|
2012-04-27 21:36:12 +02:00
|
|
|
|
{% endif %}
|
2012-09-05 00:20:28 +02:00
|
|
|
|
<small class="pull-right">
|
|
|
|
|
<a href="{% url item_overview %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
|
|
|
|
|
</small>
|
|
|
|
|
</h1>
|
2011-07-31 10:46:29 +02:00
|
|
|
|
<form action="" method="post">{% csrf_token %}
|
2012-09-05 00:20:28 +02:00
|
|
|
|
{% for field in form %}
|
|
|
|
|
<div class="control-group{% if field.errors %} error{% endif%}">
|
|
|
|
|
<label for="id_{{ field.name }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}:</label>
|
|
|
|
|
{{ field }}
|
|
|
|
|
{% if field.errors %}
|
|
|
|
|
<span class="help-inline">{{ field.errors }}</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if field.help_text %}
|
|
|
|
|
<span class="help-inline">{{ field.help_text }})</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<button class="btn btn-primary" type="submit">
|
|
|
|
|
{% trans 'Save' %}
|
|
|
|
|
</button>
|
|
|
|
|
<button class="btn" type="submit" name="apply">
|
|
|
|
|
{% trans 'Apply' %}
|
|
|
|
|
</button>
|
|
|
|
|
<a href='{% url item_overview %}'>
|
|
|
|
|
<button class="btn" type="button" onclick="window.location='{% url item_overview %}'">
|
|
|
|
|
{% trans 'Cancel' %}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2012-07-16 14:00:29 +02:00
|
|
|
|
<small>* {% trans "required" %}</small>
|
2011-07-31 10:46:29 +02:00
|
|
|
|
</form>
|
|
|
|
|
{% endblock %}
|