Fix document chooser template to account for hidden fields

pull/3640/merge
Jeffrey Chau 2017-06-07 15:27:38 -07:00 zatwierdzone przez Matt Westcott
rodzic 61b6de2e4e
commit 0c9ad90edd
3 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -13,6 +13,7 @@ Changelog
* Fix: Unauthenticated AJAX requests to admin views now return 403 rather than redirecting to the login page (Karl Hobley) * Fix: Unauthenticated AJAX requests to admin views now return 403 rather than redirecting to the login page (Karl Hobley)
* Fix: `TableBlock` options `afterChange`, `afterCreateCol`, `afterCreateRow`, `afterRemoveCol`, `afterRemoveRow` and `contextMenu` can now be overridden (Loic Teixeira) * Fix: `TableBlock` options `afterChange`, `afterCreateCol`, `afterCreateRow`, `afterRemoveCol`, `afterRemoveRow` and `contextMenu` can now be overridden (Loic Teixeira)
* Fix: The lastmod field returned by wagtailsitemaps now shows the last published date rather than the date of the last draft edit (Matt Westcott) * Fix: The lastmod field returned by wagtailsitemaps now shows the last published date rather than the date of the last draft edit (Matt Westcott)
* Fix: Document chooser upload form no longer renders container elements for hidden fields (Jeffrey Chau)
1.10.1 (19.05.2017) 1.10.1 (19.05.2017)

Wyświetl plik

@ -57,6 +57,7 @@ Bug fixes
* Unauthenticated AJAX requests to admin views now return 403 rather than redirecting to the login page (Karl Hobley) * Unauthenticated AJAX requests to admin views now return 403 rather than redirecting to the login page (Karl Hobley)
* ``TableBlock`` options ``afterChange``, ``afterCreateCol``, ``afterCreateRow``, ``afterRemoveCol``, ``afterRemoveRow`` and ``contextMenu`` can now be overridden (Loic Teixeira) * ``TableBlock`` options ``afterChange``, ``afterCreateCol``, ``afterCreateRow``, ``afterRemoveCol``, ``afterRemoveRow`` and ``contextMenu`` can now be overridden (Loic Teixeira)
* The lastmod field returned by wagtailsitemaps now shows the last published date rather than the date of the last draft edit (Matt Westcott) * The lastmod field returned by wagtailsitemaps now shows the last published date rather than the date of the last draft edit (Matt Westcott)
* Document chooser upload form no longer renders container elements for hidden fields (Jeffrey Chau)
Upgrade considerations Upgrade considerations

Wyświetl plik

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