From 18d320422a7f45f2c0057b8a3f99fe6e3ed50f90 Mon Sep 17 00:00:00 2001 From: Francisco Penedo Date: Wed, 24 Apr 2024 21:22:23 +0200 Subject: [PATCH] Fix tom selects getting destroyed on book changes --- src/hxbooks/templates/base.html.j2 | 47 ++++++++++++------------ src/hxbooks/templates/books/book.html.j2 | 8 ++-- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/hxbooks/templates/base.html.j2 b/src/hxbooks/templates/base.html.j2 index 1d0f043..bbfc0c2 100644 --- a/src/hxbooks/templates/base.html.j2 +++ b/src/hxbooks/templates/base.html.j2 @@ -14,6 +14,29 @@ + + + + + + + @@ -58,31 +81,7 @@ - - - - - - - - \ No newline at end of file diff --git a/src/hxbooks/templates/books/book.html.j2 b/src/hxbooks/templates/books/book.html.j2 index e6aa65c..61ef706 100644 --- a/src/hxbooks/templates/books/book.html.j2 +++ b/src/hxbooks/templates/books/book.html.j2 @@ -8,8 +8,8 @@
{% block form %} -
+ {% from "error_feedback.html.j2" import validation_error %} {% macro simple_field(field, name, value, type) %} @@ -94,9 +94,9 @@
+ hx-swap="innerHTML" hx-push-url="true" value="Submit"> + hx-confirm="Are you sure?" hx-push-url="true">Delete