From 7bd3ff4c263a7fb94441eb96320b6723c6c54c7f Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 22 Nov 2020 23:56:34 +1100 Subject: [PATCH] fixed up author and publisher drop-down lists to have right id/val, not sure if array subscripting the names will work. To be tested, also removed as many divs and margins and paddings as I can, still dont fully understand why some indent more than others, etc. but it works for now --- templates/book.html | 100 +++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/templates/book.html b/templates/book.html index c92d088..b826bc3 100644 --- a/templates/book.html +++ b/templates/book.html @@ -25,67 +25,63 @@ {% endfor %} {% elif key == "publisher" %} -
-
+
+
+ +
+ +
+ {% elif key == "author" %} +
+ {% set cnt = namespace(idx=0) %} + {% for objects in books[key] %} +
+ {% if cnt.idx > 0 %} +
+ +
+ {% endif %}
- -
-
- {% elif key == "author" %} -
-
- {% set cnt = namespace(idx=0) %} - {% for objects in books[key] %} -
- {% if cnt.idx > 0 %} -
- -
- {% endif %} -
- -
- -
- {% set cnt.idx = cnt.idx+1 %} - {% endfor %} -
- -
-
-
+
+ {% set cnt.idx = cnt.idx+1 %} + {% endfor %} +
+ +
+
{% else %} -
- {{book_form[key](class="form-control", value=books[key], rows="5" )}} -
+
+ {{book_form[key](class="form-control", value=books[key], rows="5" )}} +
{% endif %} {% endfor %}