Code

Ticket #11277: 11277-admin-hiddeninput-fieldset.html.diff

File 11277-admin-hiddeninput-fieldset.html.diff, 1002 bytes (added by Ben Boyd <beathan@…>, 3 years ago)
Line 
1Index: django/contrib/admin/templates/admin/includes/fieldset.html
2===================================================================
3--- django/contrib/admin/templates/admin/includes/fieldset.html (revision 16105)
4+++ django/contrib/admin/templates/admin/includes/fieldset.html (working copy)
5@@ -4,6 +4,7 @@
6         <div class="description">{{ fieldset.description|safe }}</div>
7     {% endif %}
8     {% for line in fieldset %}
9+        {% if not line.has_hidden_field %}
10         <div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">
11             {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
12             {% for field in line %}
13@@ -25,5 +26,10 @@
14                 </div>
15             {% endfor %}
16         </div>
17+        {% else %}
18+            {% for field in line %}
19+                {{ field.field }}
20+            {% endfor %}
21+        {% endif %}
22     {% endfor %}
23 </fieldset>