From ef7bd7989e108a60627033bf71605a521ccc70f4 Mon Sep 17 00:00:00 2001 From: Damian Date: Thu, 14 Mar 2019 14:08:47 +0100 Subject: [PATCH] add form media to user add/edit forms (#5146) --- CHANGELOG.txt | 1 + CONTRIBUTORS.rst | 1 + docs/releases/2.5.rst | 1 + .../users/templates/wagtailusers/users/create.html | 11 +++++++++++ wagtail/users/templates/wagtailusers/users/edit.html | 9 +++++++++ 5 files changed, 23 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8c2cb2bbae..f63ee32f7d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -35,6 +35,7 @@ Changelog * Fix: Don't show page type on page chooser button when multiple types are allowed (Thijs Kramer) * Fix: Make sure page chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs) * Fix: Inform user when moving a page from one parent to another where there is an already existing page with the same slug (Casper Timmers) + * Fix: User add/edit forms now support form widgets with JS/CSS media (Damian Grinwis) 2.4 (19.12.2018) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 39ad62c962..97de1fe133 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -354,6 +354,7 @@ Contributors * Thomas Kremmel * patta42 * Esper Kuijs +* Damian Grinwis Translators =========== diff --git a/docs/releases/2.5.rst b/docs/releases/2.5.rst index aeebe54613..9efbdeafb5 100644 --- a/docs/releases/2.5.rst +++ b/docs/releases/2.5.rst @@ -50,6 +50,7 @@ Bug fixes * Page copying no longer allowed if page model has reached its ``max_count`` (Andy Babic) * Don't show page type on page chooser button when multiple types are allowed (Thijs Kramer) * Make sure page chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs) + * User add/edit forms now support form widgets with JS/CSS media (Damian Grinwis) Upgrade considerations diff --git a/wagtail/users/templates/wagtailusers/users/create.html b/wagtail/users/templates/wagtailusers/users/create.html index 75452905a6..f036114e0f 100644 --- a/wagtail/users/templates/wagtailusers/users/create.html +++ b/wagtail/users/templates/wagtailusers/users/create.html @@ -46,3 +46,14 @@ {% endblock %} + +{% block extra_css %} + {{ block.super }} + {% include "wagtailadmin/pages/_editor_css.html" %} + {{ form.media.css }} +{% endblock %} +{% block extra_js %} + {{ block.super }} + {% include "wagtailadmin/pages/_editor_js.html" %} + {{ form.media.js }} +{% endblock %} diff --git a/wagtail/users/templates/wagtailusers/users/edit.html b/wagtail/users/templates/wagtailusers/users/edit.html index 951bdca369..1b52c78364 100644 --- a/wagtail/users/templates/wagtailusers/users/edit.html +++ b/wagtail/users/templates/wagtailusers/users/edit.html @@ -63,3 +63,12 @@ {% endblock %} + +{% block extra_css %} + {{ block.super }} + {% include "wagtailadmin/pages/_editor_css.html" %} +{% endblock %} +{% block extra_js %} + {{ block.super }} + {% include "wagtailadmin/pages/_editor_js.html" %} +{% endblock %}