From 666015e867d3ebd474c0021c212cc92b62d74343 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 16 Oct 2021 20:50:04 +0200 Subject: [PATCH] Fix datepicker localized month names Removed redundant parenthesis in kobo.py response --- cps/kobo.py | 2 +- cps/static/js/edit_books.js | 1 + cps/templates/search_form.html | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cps/kobo.py b/cps/kobo.py index 92abf295..8a395821 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -961,7 +961,7 @@ def HandleBookDeletionRequest(book_uuid): ub.session.merge(archived_book) ub.session_commit() - return ("", 204) + return "", 204 # TODO: Implement the following routes diff --git a/cps/static/js/edit_books.js b/cps/static/js/edit_books.js index 88057162..ef1eb42b 100644 --- a/cps/static/js/edit_books.js +++ b/cps/static/js/edit_books.js @@ -23,6 +23,7 @@ if ($(".tiny_editor").length) { $(".datepicker").datepicker({ format: "yyyy-mm-dd", + language: language }).on("change", function () { // Show localized date over top of the standard YYYY-MM-DD date var pubDate; diff --git a/cps/templates/search_form.html b/cps/templates/search_form.html index b431af1c..c24ccd91 100644 --- a/cps/templates/search_form.html +++ b/cps/templates/search_form.html @@ -229,6 +229,9 @@ {% endblock %} {% block js %} + {% if not g.user.locale == 'en' %}