From f07cc8b10359ca83b426dc7ff316d3ea90c0e038 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Tue, 13 Apr 2021 19:26:10 +0200 Subject: [PATCH] Update optional-requirements: flask-dance Catch error for invalid oauth tokens Fixes for displaying error messages on deleting books from list Fixes for displaying error messages on deleting bookformats Removed non working sorting in books list --- cps/templates/book_table.html | 19 ++++++++++--------- cps/web.py | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index 6a31c235..e700eb53 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -1,6 +1,7 @@ {% extends "layout.html" %} -{% macro text_table_row(parameter, edit_text, show_text, validate) -%} - {% endif %} - {{ text_table_row('title', _('Enter Title'),_('Title'), true) }} - {{ text_table_row('sort', _('Enter Title Sort'),_('Title Sort'), false) }} - {{ text_table_row('author_sort', _('Enter Author Sort'),_('Author Sort'), false) }} + {{ text_table_row('title', _('Enter Title'),_('Title'), true, true) }} + {{ text_table_row('sort', _('Enter Title Sort'),_('Title Sort'), false, true) }} + {{ text_table_row('author_sort', _('Enter Author Sort'),_('Author Sort'), false, true) }} {{ text_table_row('authors', _('Enter Authors'),_('Authors'), true) }} - {{ text_table_row('tags', _('Enter Categories'),_('Categories'), false) }} - {{ text_table_row('series', _('Enter Series'),_('Series'), false) }} + {{ text_table_row('tags', _('Enter Categories'),_('Categories'), false, false) }} + {{ text_table_row('series', _('Enter Series'),_('Series'), false, false) }} {{_('Series Index')}} - {{ text_table_row('languages', _('Enter Languages'),_('Languages'), false) }} + {{ text_table_row('languages', _('Enter Languages'),_('Languages'), false, false) }} - {{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false) }} + {{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false, false) }} {% if g.user.role_delete_books() and g.user.role_edit()%} {{_('Delete')}} {% endif %} diff --git a/cps/web.py b/cps/web.py index 65398e6c..52f2b82c 100644 --- a/cps/web.py +++ b/cps/web.py @@ -762,7 +762,6 @@ def list_books(): if sort == "state": state = json.loads(request.args.get("state", "[]")) - if sort != "state" and order: order = [text(sort + " " + order)] elif not state: