From 33ca7b4b763c118cf84ee85205e64ccd1355b220 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 4 May 2021 08:54:53 -0700 Subject: [PATCH] Adds datepicker script dependencies to templates --- bookwyrm/templates/author.html | 3 +++ bookwyrm/templates/book/book.html | 1 + bookwyrm/templates/book/edit_book.html | 8 ++++++-- bookwyrm/templates/book/editions.html | 4 ++++ bookwyrm/templates/edit_author.html | 4 ++++ bookwyrm/templates/feed/feed_layout.html | 1 + bookwyrm/templates/get_started/books.html | 4 ++++ bookwyrm/templates/user/layout.html | 5 +++++ 8 files changed, 28 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/author.html b/bookwyrm/templates/author.html index bc1034a8..0ef876fd 100644 --- a/bookwyrm/templates/author.html +++ b/bookwyrm/templates/author.html @@ -39,3 +39,6 @@ {% endblock %} +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %} diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 40da6486..53be123d 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -333,4 +333,5 @@ {% block scripts %} +{% include 'snippets/datepicker_js.html' %} {% endblock %} diff --git a/bookwyrm/templates/book/edit_book.html b/bookwyrm/templates/book/edit_book.html index 8ebbeaae..095439d1 100644 --- a/bookwyrm/templates/book/edit_book.html +++ b/bookwyrm/templates/book/edit_book.html @@ -133,7 +133,7 @@

- +

{% for error in form.first_published_date.errors %}

{{ error | escape }}

@@ -141,7 +141,7 @@

- +

{% for error in form.published_date.errors %}

{{ error | escape }}

@@ -245,3 +245,7 @@ {% endblock %} + +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %} diff --git a/bookwyrm/templates/book/editions.html b/bookwyrm/templates/book/editions.html index efbe1566..8af85ace 100644 --- a/bookwyrm/templates/book/editions.html +++ b/bookwyrm/templates/book/editions.html @@ -51,3 +51,7 @@ {% include 'snippets/pagination.html' with page=editions path=request.path %} {% endblock %} + +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %} diff --git a/bookwyrm/templates/edit_author.html b/bookwyrm/templates/edit_author.html index 542b57f9..ded8c494 100644 --- a/bookwyrm/templates/edit_author.html +++ b/bookwyrm/templates/edit_author.html @@ -81,3 +81,7 @@ {% endblock %} + +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %} diff --git a/bookwyrm/templates/feed/feed_layout.html b/bookwyrm/templates/feed/feed_layout.html index 75fc1951..431cf6dd 100644 --- a/bookwyrm/templates/feed/feed_layout.html +++ b/bookwyrm/templates/feed/feed_layout.html @@ -105,4 +105,5 @@ {% block scripts %} +{% include 'snippets/datepicker_js.html' %} {% endblock %} diff --git a/bookwyrm/templates/get_started/books.html b/bookwyrm/templates/get_started/books.html index 9613508b..e3fd87bb 100644 --- a/bookwyrm/templates/get_started/books.html +++ b/bookwyrm/templates/get_started/books.html @@ -64,3 +64,7 @@ {% endblock %} + +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %} diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html index 661d8078..1aa76202 100644 --- a/bookwyrm/templates/user/layout.html +++ b/bookwyrm/templates/user/layout.html @@ -81,3 +81,8 @@ {% block panel %}{% endblock %} {% endblock %} + + +{% block scripts %} +{% include 'snippets/datepicker_js.html' %} +{% endblock %}