Followup to #3640. Fix hidden field rendering in other document forms

This commit is contained in:
Jeffrey Chau 2017-08-01 15:57:34 -07:00 committed by Matt Westcott
parent 7a1455551b
commit c26e019ed1
4 changed files with 9 additions and 1 deletions

View file

@ -27,6 +27,7 @@ Changelog
* Fix: Position of options in mobile nav-menu (Jack Paine)
* Fix: Center page editor footer regardless of screen width (Jack Paine)
* Fix: Change the design of the navbar toggle icon so that it no longer obstructs page headers (Jack Paine)
* Fix: Document add/edit forms no longer render container elements for hidden fields (Jeffrey Chau)
1.11.1 (07.07.2017)

View file

@ -51,6 +51,7 @@ Bug fixes
* Position of options in mobile nav-menu (Jack Paine)
* Center page editor footer regardless of screen width (Jack Paine)
* Change the design of the navbar toggle icon so that it no longer obstructs page headers (Jack Paine)
* Document add/edit forms no longer render container elements for hidden fields (Jeffrey Chau)
Upgrade considerations
======================

View file

@ -25,7 +25,11 @@
{% csrf_token %}
<ul class="fields">
{% for field in form %}
{% include "wagtailadmin/shared/field_as_li.html" with field=field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% include "wagtailadmin/shared/field_as_li.html" with field=field %}
{% endif %}
{% endfor %}
<li>
<button type="submit" class="button button-longrunning" data-clicked-text="{% trans 'Uploading...' %}"><span class="icon icon-spinner"></span><em>{% trans 'Upload' %}</em></button>

View file

@ -29,6 +29,8 @@
{% for field in form %}
{% if field.name == 'file' %}
{% include "wagtaildocs/documents/_file_field_as_li.html" %}
{% elif field.is_hidden %}
{{ field }}
{% else %}
{% include "wagtailadmin/shared/field_as_li.html" %}
{% endif %}