Fix up fieldset templates. Closes #2039

This commit is contained in:
Tom Christie 2014-11-07 15:22:17 +00:00
parent 4e2627736f
commit 02844a1507
3 changed files with 9 additions and 3 deletions

View File

@ -6,6 +6,8 @@
</div> </div>
{% endif %} {% endif %}
{% for nested_field in field %} {% for nested_field in field %}
{% render_field nested_field template_pack=template_pack renderer=renderer %} {% if not nested_field.read_only %}
{% render_field nested_field style=style %}
{% endif %}
{% endfor %} {% endfor %}
</fieldset> </fieldset>

View File

@ -1,4 +1,6 @@
{% load rest_framework %} {% load rest_framework %}
{% for nested_field in field %} {% for nested_field in field %}
{% render_field nested_field template_pack=template_pack renderer=renderer %} {% if not nested_field.read_only %}
{% render_field nested_field style=style %}
{% endif %}
{% endfor %} {% endfor %}

View File

@ -2,6 +2,8 @@
<fieldset> <fieldset>
{% if field.label %}<legend {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</legend>{% endif %} {% if field.label %}<legend {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</legend>{% endif %}
{% for nested_field in field %} {% for nested_field in field %}
{% render_field nested_field template_pack=template_pack renderer=renderer %} {% if not nested_field.read_only %}
{% render_field nested_field style=style %}
{% endif %}
{% endfor %} {% endfor %}
</fieldset> </fieldset>