{% extends 'layouts/layoutAuth.twig' %}
{% block title %}{{ __('Setup') }}{% endblock %}

{% block content %}

	<div class="setupWrapper">

		{% if systemcheck %}
			<h2>Missing Requirements</h2>
			{% if systemcheck.error %}
				<ul style="color:red;padding: 0 14px">
					{% for systemerror in systemcheck.error %}
						<li style="margin: 5px 0">{{ systemerror }}</li>
					{% endfor %}
				</ul>
			{% endif %}
		{% endif %}

		<div class="authformWrapper">
			<form method="POST" action="{{ path_for('setup.create') }}" autocomplete="off">

				<fieldset class="auth">
					<div class="formElement{{ errors.username ? ' errors' : '' }}">
						<label for="username">{{ __('Username') }} <abbr title="{{ __('required') }}">*</abbr></label>
						<input type="text" name="username" value="{{ old.username }}" required>
						{% if errors.username %}
							<span class="error">{{ errors.username | first }}</span>
						{% endif %}
					</div>
					<div class="formElement{{ errors.email ? ' errors' : '' }}">
						<label for="email">{{ __('E-Mail') }} <abbr title="{{ __('required') }}">*</abbr></label>
						<input type="text" name="email" value="{{ old.email }}" required>
						{% if errors.email %}
							<span class="error">{{ errors.email | first }}</span>
						{% endif %}
					</div>
					<div class="formElement{{ errors.password ? ' errors' : '' }}">
						<label for="password">{{ __('Password') }} <abbr title="{{ __('required') }}">*</abbr></label>
						<input type="password" name="password" required autocomplete="off">
						{% if errors.password %}
							<span class="error">{{ errors.password | first }}</span>
						{% endif %}
					</div>
				</fieldset>

				<input type="submit" value="{{ __('Create User') }}" />
				{{ csrf_field() | raw }}
						
			</form>
		</div>		
	</div>
	
{% endblock %}
