Display errors on invalid forms

It will probably need a bit of styling…
This commit is contained in:
Bat
2018-07-06 19:29:36 +02:00
parent 153400959c
commit 5f3afe900f
12 changed files with 68 additions and 39 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
{% extends "base" %}
{% import "macros" as macros %}
{% block title %}
{{ "New blog" | _ }}
@@ -7,8 +8,8 @@
{% block content %}
<h1>{{ "Create a blog" | _ }}</h1>
<form method="post">
<label for="title">{{ "Title" | _ }}</label>
<input type="text" id="title" name="title" />
{{ macros::input(name="title", label="Title", errors=errors, form=form) }}
<input type="submit" value="{{ "Create blog" | _ }}"/>
</form>
{% endblock content %}