From 5adc4001f8a82fd35a7ab0c285eba7635d750235 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 6 Dec 2011 18:57:33 +0000 Subject: [PATCH] Show hidden fields (fixes the update api issue) --- app/eve_api/templates/eve_api/update.html | 1 + app/formtools/templates/formtools/formfield.html | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/eve_api/templates/eve_api/update.html b/app/eve_api/templates/eve_api/update.html index 30d8aaf..978a057 100644 --- a/app/eve_api/templates/eve_api/update.html +++ b/app/eve_api/templates/eve_api/update.html @@ -12,6 +12,7 @@
{% include "formtools/formerror.html" %} + {% include "formtools/formfield.html" with field=form.user %} {% include "formtools/formfield.html" with field=form.api_user_id %} {% include "formtools/formfield.html" with field=form.api_key class="xxlarge" %} {% include "formtools/formfield.html" with field=form.description class="xxlarge" %} diff --git a/app/formtools/templates/formtools/formfield.html b/app/formtools/templates/formtools/formfield.html index 165913f..65f3614 100644 --- a/app/formtools/templates/formtools/formfield.html +++ b/app/formtools/templates/formtools/formfield.html @@ -1,11 +1,14 @@ {% load add_class %} +{% if field.is_hidden %} +{{ field }} +{% else %}
{{ field.label_tag }}
- {% if class %}{{ field|add_class:class }}{% else %}{{ field}}{% endif %} + {% if class %}{{ field|add_class:class }}{% else %}{{ field }}{% endif %} {% if field.help_text %}{{ field.help_text }}{% endif %} {% if field.errors %}{% for error in field.errors %}{{ error }} {% endfor %}{% endif %}
- +{% endif %}