summaryrefslogtreecommitdiff
path: root/app/templates/base/form.html
blob: 830afbe89907e853d07cb7aef1de43628b5f090d (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
32
33
{% extends 'base/layout.html' %}

{% block content %}
	<div class="form">
		<section class="hero is-primary is-fullheight-with-navbar">
			<div class="hero-body">
				<div class="container">
					<div class="columns is-centered">
						<div class="column is-5-tablet is-4-desktop is-3-widescreen">
							<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 %}
										<div class="notification is-{{ category }}">
											{{ message }}
										</div>
									{% endfor %}
								{% endif %}
							{% endwith %}

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