{% extends 'base.html' %}
{% block title %}New account{% endblock %}
{% block content %}
	<h1>New account</h1>
	{% if form.non_field_errors %}
		<div class="alert alert-danger">
			Oops! Something went wrong. The project was not created because:<br>
			{{ form.non_field_errors }}
		</div>
	{% endif %}
	<form method="post" action="{% url 'create_account' %}">
		{% csrf_token %}
		<div class="form-group">
			<div class="row">
				<div class="col-sm-4">
					<input type="text" name="name" placeholder="Name" maxlength="100" class="form-control" value="{{ form.name.value }}" autofocus>
				</div>
				<div class="col-sm-8 form-control-static danger-highlight">
					{{ form.name.errors|striptags }}
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="checkbox">
				<label>
					<input type="checkbox" name="active" checked> Active
				</label>
			</div>
		</div>
		<div class="form-group">
			<input type="submit" class="btn btn-success" value="Create new account">
		</div>
		<div class="form-group">
			<a href="{% url 'accounts_and_projects' %}" class="btn btn-warning">Abandon account creation</a>
		</div>
	</form>
{% endblock %}