{% extends "djhcup_base.html" %}

{% block content %}
<form class="form-horizontal" method="post">
	{{ form.non_field_errors.as_ul }}
	{% csrf_token %}
	<div class="form-group">
		<label class="col-md-4 control-label">Username</label>
		<div class="col-md-4">
			<input type="text" class="form-control" name="username"
				value="{{ form.username.value|default_if_none:"" }}" required>
			{% for error in form.username.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
			<span class="help-block"><span class="text-info">{{ form.username.help_text }}</span></span>
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-4 control-label">First name</label>
		<div class="col-md-4">
			<input type="text" class="form-control" name="first_name"
				value="{{ form.first_name.value|default_if_none:"" }}" required>
			{% for error in form.first_name.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-4 control-label">Last name</label>
		<div class="col-md-4">
			<input type="text" class="form-control" name="last_name"
				value="{{ form.last_name.value|default_if_none:"" }}" required>
			{% for error in form.last_name.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-4 control-label">Email address</label>
		<div class="col-md-4">
			<input type="email" class="form-control" name="email"
				value="{{ form.email.value|default_if_none:"" }}" required>
			{% for error in form.email.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-4 control-label">Password</label>
		<div class="col-lg-4">
			<input type="password" class="form-control" name="password1" required>
			{% for error in form.password1.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-4 control-label">Confirm password</label>
		<div class="col-lg-4">
			<input type="password" class="form-control" name="password2" required>
			{% for error in form.password2.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<div class="col-md-offset-4 col-lg-4">
			<div class="checkbox">
				<label>
					<input type="checkbox" name="hcup_agreed"> I have completed HCUP online training and have
					signed and submitted the HCUP Data Usage Agreement.
				</label>
			</div>
			{% for error in form.hcup_agreed.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-4 control-label">HCUP training certification code</label>
		<div class="col-md-4">
			<input type="text" class="form-control" name="hcup_cert_code"
				value="{{ form.hcup_cert_code.value|default_if_none:"" }}" required>
			{% for error in form.hcup_cert_code.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<div class="col-md-offset-4 col-lg-4">
			<div class="checkbox">
				<label>
					<input type="checkbox" name="pudf_agreed"> I have signed and submitted
					the Texas PUDF Data Use Agreement.
				</label>
			</div>
			{% for error in form.pudf_agreed.errors %}
			<span class="help-block"><span class="text-danger">{{ error }}</span></span>
			{% endfor %}
		</div>
	</div>
	<div class="form-group">
		<div class="col-lg-offset-4 col-lg-4">
			<button type="submit" class="btn btn-primary">Register</button>
		</div>
	</div>
</form>
{% endblock %}