add.html 1.25 KB
Newer Older
stef's avatar
stef committed
1
2
{% extends "base.html" %}
{% load bt %}
3
{% load i18n %}
4
5
6
{% block styles %}
  <link rel="stylesheet" type="text/css" media="all" href="{% media_url %}/css/jquery.autocomplete.css" />
{% endblock %}
stef's avatar
stef committed
7
8
9
10
{% block scripts %}
<script type="text/javascript" src="{%media_url%}/js/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="{%media_url%}/js/editor.js"></script>
<script type="text/javascript" src="{%media_url%}/js/jquery.1.4.2.min.js"></script>
11
<script type="text/javascript" src="{%media_url%}/js/jquery.autocomplete.js"></script>
stef's avatar
stef committed
12
<script type="text/javascript" src="{%media_url%}/js/form.js"></script>
stef's avatar
stef committed
13
14
15
{% endblock %}

{%block content%}
16
  <h2>{% trans "New Violation" %}</h2>
stef's avatar
stef committed
17
<form id='addForm' name="addForm" enctype="multipart/form-data" action="{% root_url %}/add/" method="post">
18
  {% for field in form %}
stef's avatar
stef committed
19
      {% if field.label = 'Resource' %}<div id="show_optionals">{% trans "Provide optional details" %}</div><div id="optional">{%endif%}
20
21
      <div class="fieldWrapper">
          {{ field.errors }}
22
          <div class="help_text">{{ field.help_text }}</div>
stef's avatar
stef committed
23
          {{ field.label_tag }} {{ field|safe }}
24
25
      </div>
  {% endfor %}
26
  </div>
27
  {% csrf_token %}
28
  <input id="save_button" type="submit" value="{% trans "save" %}" />
stef's avatar
stef committed
29
30
</form>
{%endblock%}