{% extends "base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}
	<div class="jumbotron">
		<div class="container">
			<h1>Setup</h1>
		</div>
	</div>
	<div class="container">
		<div class="col-md-6 offset-md-3">
			<h2 class="text-center">CTF Settings</h2>
			{% for error in errors %}
				<div class="submit-row">
					<div class="alert alert-danger alert-dismissable" role="alert">
						<span class="sr-only">Error:</span>
						{{ error }}
						<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
								aria-hidden="true">×</span></button>
					</div>
				</div>
			{% endfor %}
			<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal">
				<input type="hidden" name="nonce" value="{{ nonce }}">
				{# This nonce is implemented specially in the route itself #}
				<div class="form-group">
					<label for="ctf_name-input">
						CTF Name
					</label>
					<input class="form-control" type="text" name="ctf_name" id="ctf_name-input"/>
				</div>
				<div class="form-group">
					<label for="username-input">
						Admin Username
					</label>
					<input class="form-control" type="text" name="name" id="username-input"/>
				</div>
				<div class="form-group">
					<label for="email-input">
						Admin Email
					</label>
					<input class="form-control" type="email" name="email" id="email-input"/>
				</div>
				<div class="form-group">
					<label for="password-input">
						Admin Password
					</label>
					<input class="form-control" type="password" name="password" id="password-input"/>
				</div>
				<br/>
				<div class="submit-row text-center">
					<button type="submit" id="submit" tabindex="5" class="btn btn-md btn-primary btn-outlined">Submit
					</button>
				</div>
			</form>
		</div>
	</div>

{% endblock %}

{% block scripts %}
	<script src="{{ request.script_root }}/themes/{{ ctf_theme() }}/static/js/style.js"></script>
{% endblock %}
