summaryrefslogtreecommitdiff
path: root/app/templates/base/form.html
blob: 22f926b76cb22eb3da9ca27e4578d35674475159 (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
34
35
36
37
{% extends 'base/layout.html' %}

{% block content %}
<div class="form">
	<section class="hero is-primary is-fullheight-with-navbar gym-background">
		<div class="hero-body">
			<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">
							{{ form.csrf_token }}
							{% block form %}{% endblock %}
						</form>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
{% endblock %}