{% load i18n %}
<html>
<head>
{% block extrastyle %}{{ block.super }}
{{ form.media }}
<link href="{{ MEDIA_URL }}formunculous/css/formunculous.css" rel="stylesheet" type="text/css" />
<link href="{{ MEDIA_URL }}formunculous/css/apply.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  html {
    font-family: Arial, Helvetica, sans-serif;
  }
</style>
{% endblock %}
</head>
<body>
{% if formset.errors %}
<div class="formunculous_errors">{% trans "There are errors in your form, please correct them" %}</div>
{% endif %}

<div style="width:100%; height: 225px">
<form method="POST" action="">{% csrf_token %}
  {{ formset.management_form }}
  <table class="formunculous_table">
	{% for form in formset.forms %}
	   {% if forloop.first %}
	   <thead>
	      <tr>
			{% for field in form %}
			  {% if not field.is_hidden %}
			    <th>{{ field.label }}</th>
			  {% endif %}
			{% endfor %}
		  </tr>
	   </thead>
	   {% endif %}
	   {% if form.errors %}
	   <tr>
		 {% for field in form %}
		   {% if not field.is_hidden %}
		     <td>
			   {% if field.errors%}
			     <div class="formunculous_errors">{{ field.errors }}</div>
			   {% endif %}
			 </td>
		   {% endif %}
		 {% endfor %}
	   </tr>
	   {% endif %}
	   <tr>
		 {% for field in form %}
		   {% if field.is_hidden %}
		     {{ field }}
		   {% else %}
		     <td>
			   {{ field }}
			 </td>
		   {% endif %}
		 {% endfor %}
	   </tr>
	   {% endfor %}
  </table>
  <div style="text-align: right;">
	<input type="submit" name="edit" value="Save" />
  </div>
  <div class="formunculous_info_box" style="margin-top: 1.6em;">
	<p>
	  {% blocktrans %}
	  Add your drop down values here.  They are sorted by
	  the <em>Value</em> column.  This column is not visible to the end
	  user, and can be used to provide a custom sort order by adding
	  numbers to the beginning of the value. e.g. 0Zebra, 1Apple.
	  {% endblocktrans %}
	</p>
  </div>

</form>
</div>
</body>
</html>
