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">