{% extends 'base_rigs.html' %}
{% load widget_tweaks %}

{% block title %}Update Profile {{object.name}}{% endblock %}

{% block content %}
<div class="row">
	<div class="col-sm-10 col-sm-offset-1">
		{% include 'form_errors.html' %}
		<h3>Update Profile</h3>
		<div class="col-sm-6">
			<form action="{{form.action|default:request.path}}" method="post" class="form-horizontal">{% csrf_token %}
				<div class="form-group">
					<label for="{{form.first_name.id_for_label}}" class="col-sm-4 control-label">{{form.first_name.label}}</label>

					<div class="col-sm-8">
						{% render_field form.first_name class+="form-control" placeholder=form.first_name.label %}
					</div>
				</div>

				<div class="form-group">
					<label for="{{form.last_name.id_for_label}}" class="col-sm-4 control-label">{{form.last_name.label}}</label>

					<div class="col-sm-8">
						{% render_field form.last_name class+="form-control" placeholder=form.last_name.label %}
					</div>
				</div>

				<div class="form-group">
					<label for="{{form.email.id_for_label}}" class="col-sm-4 control-label">{{form.email.label}}</label>

					<div class="col-sm-8">
						{% render_field form.email type="email" class+="form-control" placeholder=form.email.label %}
					</div>
				</div>

				<div class="form-group">
					<label for="{{form.initials.id_for_label}}" class="col-sm-4 control-label">{{form.initials.label}}</label>

					<div class="col-sm-8">
						{% render_field form.initials class+="form-control" placeholder=form.initials.label %}
					</div>
				</div>

				<div class="form-group">
					<label for="{{form.phone.id_for_label}}" class="col-sm-4 control-label">{{form.phone.label}}</label>

					<div class="col-sm-8">
						{% render_field form.phone type="tel" class+="form-control" placeholder=form.phone.label %}
					</div>
				</div>

				<div class="form-group">
	                <input class="btn btn-primary pull-right" type="submit"/>
	            </div>
			</form>
		</div>

		<div class="col-sm-3 col-sm-offset-2">
			<div class="center-block">
				<a href="https://gravatar.com/">
					<img src="{{object.profile_picture}}" class="img-responsive img-rounded" />
					<div class="text-center">
						Images hosted by Gravatar
					</div>
				</a>
			</div>
		</div>
	</div>
</div>
{% endblock %}