diff --git a/flaskr/static/styles.css b/flaskr/static/styles.css index 8e545c9..dc15196 100644 --- a/flaskr/static/styles.css +++ b/flaskr/static/styles.css @@ -97,6 +97,10 @@ textarea { flex-grow: 1; } +.errors { + color: #a40f0f; +} + #body { flex-grow: 1; } diff --git a/flaskr/templates/writing.html b/flaskr/templates/writing.html index 4b79068..21e2f12 100644 --- a/flaskr/templates/writing.html +++ b/flaskr/templates/writing.html @@ -20,7 +20,11 @@ } return ""; } - function loadCookies() { + function init() { + {% if errors %} + window.scrollTo(0, document.body.scrollHeight); + {% endif %} + if (document.getElementById('company').value === "BananaCorp") { return } @@ -43,7 +47,7 @@ } } } - window.onload = loadCookies; + window.onload = init;
@@ -61,14 +65,26 @@ {{ render_field(form.body, 'class=bigtext') }} {{ render_field(form.closingtext) }} - {% if err %} -
- {% for error in err %}
- {{ error }}
- {% endfor %}
+ {% if errors %}
+
There is likely a typo in one of your variables (the {\blabla} bits).
+
Make sure each is spelled correctly, and has the correct brackets on either
+ side
+ {% for error in errors %}
+ {{ error }}
+ {% endfor %}