Hide the document type field if document type is specified in the form's initial values

This commit is contained in:
Roberto Rosario
2011-02-04 01:39:39 -04:00
parent 5e524fb825
commit 6243a2f1f6
3 changed files with 13 additions and 1 deletions

View File

@@ -27,7 +27,11 @@
{% endfor %}
</tr>
{% else %}
{% for field in form %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
{% for field in form.visible_fields %}
<div class="group">
{% if field.errors %}<div class="fieldWithErrors">{% endif %}
<label class="label">{{ field.label_tag }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %}</label>