From 934728e3c543fe5a2851226778166d6895a60f9e Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 4 Dec 2021 15:29:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20switch=20to=20bootstrap-flask=20?= =?UTF-8?q?/=20bootstrap=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 4 +--- templates/base.html | 6 ++++++ templates/download.html | 23 ++++++++++++----------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/TODO.md b/TODO.md index 3c80703..6dacca6 100644 --- a/TODO.md +++ b/TODO.md @@ -2,11 +2,9 @@ * close filehandle after sending? * or clean up when handling subsequent requests * `DeprecationWarning: The 'attachment_filename' parameter has been renamed to 'download_name'. The old name will be removed in Flask 2.1.` +* "Keine gültige ganze Zahl" ist keine gute fehlermeldung bootstrap 4 ----------- -* fix calender locale ("December") -* waren die Fehler früher rot? - * add "Minuten" to Länge * update screenshot diff --git a/templates/base.html b/templates/base.html index 37fbf83..49f5556 100644 --- a/templates/base.html +++ b/templates/base.html @@ -18,7 +18,13 @@ +
+
+
{{ utils.render_messages() }} +
+
+
{% block app_content %}{% endblock %} diff --git a/templates/download.html b/templates/download.html index c621f07..66224e5 100644 --- a/templates/download.html +++ b/templates/download.html @@ -32,10 +32,11 @@ {{ wtf.form_errors(form, hiddens="only") }} -
+
{{ form.start_time.label(class_="form-control-label") }}
-
- {% for error in form.start_time.errors %} -

{{ error }}

- {% endfor %} + {% if form.start_time.errors %} +
{{ form.start_time.errors|join("
")|safe }}
+ {% endif %}
-
+
{{ form.length.label(class_="form-control-label") }} - {{ form.length(class_="form-control") }} - {% for error in form.length.errors %} -

{{ error }}

- {% endfor %} + {{ form.length(class_="form-control " + ("is-invalid" if form.length.errors else "")) }} + {% if form.length.errors %} +
{{ form.length.errors|join("
")|safe }}
+ {% endif %}
@@ -74,7 +75,7 @@ {{ super() }} + src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.0/moment-with-locales.min.js">