
<form role="form" name="userEdit">


	<div class="col-xs-12 col-sm-3">
		<h3><i class="fa fa-user"></i> <span translate>Wellcome</span></h3>
		<p translate>This application is provided to you by {{company.name}}</p>

	</div>


	<div class="col-xs-12 col-sm-9">

		<div class="jumbotron">
			<p translate>You have been invited by {{invitation.createdBy.name}} to create an account on the leave management application!</p>
			<p translate>Please setup your account.</p>
		</div>


		<div class="row">
			<div class="form-group col-md-6">
				<label for="user_firstname" translate>Firstname</label>
				<input type="text" class="form-control" id="user_firstname" ng-model="user.firstname" ng-required="true" />
			</div>

			<div class="form-group col-md-6">
				<label for="user_lastname" translate>Lastname</label>
				<input type="text" class="form-control" id="user_lastname" ng-model="user.lastname" ng-required="true" />
			</div>
		</div>

		<div class="row">
			<div class="col-md-6 form-group">
			    <label for="birth" translate>Birth date</label>
			    <div class="input-group">
			        <div class="input-group-addon"><i class="fa fa-calendar-o"></i></div>
			        <input type="text" id="birth" class="form-control" ng-model="user.roles.account.birth" data-autoclose="1" container="body" bs-datepicker />
			    </div>
			</div>
		</div>

		<div class="form-group">
			<label for="user_collection" translate>Your leave plan or work regime</label>
			<select class="form-control" id="user_collection" ng-model="user.collection" ng-options="collection._id as collection.name for collection in invitation.collections">
			</select>
		</div>


		<div class="form-group">
			<label for="user_scheduleCalendar" translate>Your workschedule for a week</label>
			<select class="form-control" id="user_scheduleCalendar" ng-model="user.scheduleCalendar" ng-options="calendar._id as calendar.name for calendar in invitation.scheduleCalendars">
			</select>
		</div>


		<div class="row top30">

			<div class="col-md-6" ng-class="{true:'', false:'has-error'}[user.newpassword==user.newpassword2]">

				<div class="form-group">
					<label for="user_password" translate>Set password</label>
					<input type="password" class="form-control" id="user_password" ng-model="user.newpassword" />
				</div>

				<div class="form-group">
					<label for="user_password2" translate>Confirm password</label>
					<input type="password" class="form-control" id="user_password2" ng-model="user.newpassword2" />
				</div>

			</div>


			<div class="col-xs-6 col-sm-5 col-md-4 top30">
				<small translate>Password Strength:</small><br />
				<div style="border:#ccc 1px solid;padding:0;">
					<div pw-width="{{ user.newpassword }}" style="background:green;height:5px;"></div>
				</div>
			</div>
		</div>

		<div class="col-sm-12 text-center top30">
			<button class="btn btn-primary" ng-click="userEdit.$valid && saveUser()" translate>Save</button>
		</div>

	</div>


</form>
