@extends('layouts.master-worker')

@section('title')
  Edit Profile | @parent
@stop

@section('styles')
  {{ HTML::style('css/worker/profile.css') }}
  {{ HTML::style('css/shared/bootstrap-datepicker-3.css') }}
@stop

@section('content')
	<div class="container profile">
		<div class="content-top-photo">
			<img src="/img/worker/profile/person-sample.png" class="img-circle">
		</div>
		<div id="profile-edit-page">
			<p class="content-top-heading">PERSONAL DATA</p>
			<form id="profile-edit" method="post" onsubmit="return false;" role="form">
				Loading...
			</form>
		</div>
	</div>
@stop

@section('scripts')
	{{ HTML::script('js/shared/mustache-2.0.js') }}
	{{ HTML::script('js/shared/bootstrap-datepicker.js') }}
	{{ HTML::script('js/worker/profile.js') }}
@stop
	
<script id="profileTemplate" type="x-tmpl-mustache">
	<div class="alert alert-success" role="alert" id="success-message">
		Success! Your information has been updated.
	</div>
	<div class="alert alert-danger" role="alert" id="error-message">

	</div>

	<div class="row">
		<div class="col-md-6 col-sm-6">
			<label>Title</label>
			<input value="@{{ title }}" class="form-control" type="text" name="title" id="title">
		</div>
		<div class="col-md-6 col-sm-6">
			<label>Select Gender</label>
			<select class="form-control" name="gender" value="@{{ gender }}" id="gender">
				<option value="Male" name="Male" id="Male">Male</option>
				<option value="Female" name="Female" id="Female">Female</option>
			</select>
		</div>
	</div>
	
	<div class="row">
		<div class="col-md-12">
			<label>Full Name</label>
			<input class="form-control" type="text" value="@{{ worker_name }}" name="fullname" id="fullname">
		</div>
	</div>
	
	<div class="row">
		<div class="col-md-6">
			<label>Date of Birth</label>
			<div class="clearfix"></div>
			<input class="form-control datepicker" type="text" id="dob" name="dob" value="@{{ date_of_birth }}">
		</div>
		<div class="col-md-6">
			<label>Mobile Number</label>
			<input type="number" class="form-control" id="mobile-number" value="@{{ mobile_phone }}" name="mobile-number">
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<label>Email Address</label>
			<input class="form-control" type="email" id="email" name="email" value="@{{ email }}">
		</div>
	</div>

	<div class="row">
		<div class="col-md-6">
			<label>Home Phone</label>
			<input class="form-control" type="text" value="@{{ home_phone }}" name="home-phone" id="home-phone">
		</div>
		<div class="col-md-6">
			<label>Other Phone</label>
			<input class="form-control" type="text" value="@{{ other_phone }}" name="other-phone" id="other-phone">
		</div>
	</div>

	<div id="residential-address-different">
		<div class="row">
			<div class="col-md-12">
				<label>Street Address</label>
				<input class="form-control" type="text" id="residential-street-address" value="@{{ street }}" name="residential-street-address">
			</div>
		</div>
		<div class="row">
			<div class="col-md-6">
				<label>City</label>
				<input class="form-control" type="text" name="residential-city" id="residential-city" value="@{{ city }}">
			</div>
			<div class="col-md-6">
				<label>Postcode</label>
				<input class="form-control" type="text" name="residential-postcode" id="residential-postcode" value="@{{ postcode }}">
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12 checkbox">
			<label for="postal-different-to-residential-checkbox">
				<input type="checkbox" id="postal-different-to-residential-checkbox" name="postal-different-to-residential-checkbox" value="@{{ postal_address }}"> My postal address is different to my residential address
			</label>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<label>Street Address</label>
			<input class="form-control" type="text" id="postal-street-address" value="@{{ postal_street }}" name="postal-street-address">
		</div>
	</div>

	<div class="row">
		<div class="col-md-6 col-sm-6">
			<label>City</label>
			<input class="form-control" type="text" name="postal-city" value="@{{ postal_city }}" id="postal-city">
		</div>
		<div class="col-md-6 col-sm-6">
			<label>Postcode</label>
			<input class="form-control" type="text" name="postal-postcode" value="@{{ postal_postcode }}" id="postal-postcode">
		</div>
	</div>

	<div class="row">
		<div class="col-md-12 checkbox">
			<label for="drivers-licence">
				<input type="checkbox" name="drivers-licence" id="drivers-licence" value="@{{ drivers_license }}"> I HAVE A DRIVERS LICENCE
			</label>
		</div>
	</div>

	<div id="passport-information">
		<div class="row">
			<div class="col-md-6">
			<label>Passport Number</label>
			<input class="form-control" type="text" value="@{{ passport_number }}" id="passport-number" name="passport-number">
		</div>
		<div class="col-md-6">
			<label>Passport Issue Date</label>
			<div class="clearfix"></div>
				<input class="form-control datepicker" type="text" value="@{{ passport_issue_date }}" id="passport-issue-date" name="passport-issue-date">
			</div>
		</div>

		<div class="row">
			<div class="col-md-6">
				<label>Passport Issue Location</label>
				<input class="form-control" type="text" id="passport-issue-location" value="@{{ passport_issue_location }}" name="passport-issue-location">
			</div>
			<div class="col-md-6">
				<label>Passport Expiry Date</label>
				<div class="clearfix"></div>
				<input class="form-control datepicker" value="@{{ passport_expiry_date }}" type="text" id="passport-expiry-date" name="passport-expiry-date">
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-md-6 col-sm-6">
			<label>Emergency Name</label>
			<input class="form-control" type="text" id="emergency-contact-name" value="@{{ emergency_contact_name }}" name="emergency-contact-name">
		</div>
		<div class="col-md-6 col-sm-6">
			<label>Emergency Contact Relationship</label>
			<input class="form-control" type="text" id="emergency-contact-relationship" value="@{{ emergency_contact_relationship }}" name="emergency-contact-relationship">
		</div>
	</div>

	<div class="row">
		<div class="col-md-6 col-sm-6">
			<label>Emergency Contact Number</label>
			<input class="form-control" type="text" id="emergency-contact-number" value="@{{ emergency_contact_number }}" name="emergency-contact-number">
		</div>
		<div class="col-md-6 col-sm-6">
			<label>Emergency Contact Email</label>
			<input class="form-control" type="email" id="emergency-contact-email" value="@{{ emergency_contact_email }}" name="emergency-contact-email">
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<label>Emergency Contact Street Address</label>
			<input class="form-control" type="text" id="emergency-contact-street-address" value="@{{ emergency_contact_street }}" name="emergency-contact-street-address">
		</div>
	</div>

	<div class="row">
		<div class="col-md-6 col-sm-6">
			<label>Emergency Contact City</label>
			<input class="form-control" type="text" id="emergency-contact-city" value="@{{ emergency_contact_city }}" name="emergency-contact-city">
		</div>
		<div class="col-md-6 col-sm-6">
			<label>Emergency Contact Postcode</label>
			<input class="form-control" type="text" id="emergency-contact-postcode" value="@{{ emergency_contact_postcode }}" name="emergency-contact-postcode">
		</div>
	</div>
	<div class="row">
		<div class="col-md-3 col-md-offset-9 text-right">
			<input type="submit" class="btn block" value="Save changes">
		</div>
	</div>
</script>