summaryrefslogtreecommitdiff
path: root/app/templates/base/form.html
blob: aff72270c0b1c476e7be3a87babe9aa8ccdb6398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends 'base/layout.html' %}

{% block content %}
	<div class="container">
		<div class="columns is-centered">
			<div class="column {{ column_classes }}">
				<h1 class="title is-2">{% block title %}{% endblock %}</h1>

				<!-- TODO: render errors -->
				{% with messages = get_flashed_messages(with_categories=true) %}
					{% if messages %}
						{% for category, message in messages %}
							{% if category == "message" %}
								<div class="notification is-info">
							{% else %}
								<div class="notification is-{{ category }}">
							{% endif %}
								{{ message }}
							</div>
						{% endfor %}
					{% endif %}
				{% endwith %}

				<form method="POST" class="box" id="form">
					{{ form.csrf_token }}
					{% block form %}{% endblock %}
				</form>
			</div>
		</div>
	</div>
{% endblock %}