<div class="login-wrap">

	<div class="login-content hide-before-init">

		<div class="logo">cockpit<span class="dot">.</span><span class="green">la</span></div>

		<div ng-show="finished">
			<div class="dialog-message dialog-message-success">
				Your username is {{driver.login}}.
			</div>
			<div class="button-pushable find-restaurants">
				<button class="button orange" ng-click="access()">Login</button>
			</div>
		</div>

		<div class="dialog-message dialog-message-error" ng-show="error">
			{{error}}
		</div>


		<?php /* Form validation stuff */?>
		<div class="dialog-message dialog-message-error" ng-show="( submitted && form.$invalid ) && !finished">
			<div class="error">
				<div class="error" ng-show="form.driverEmail.$invalid">Enter a valid email.</div>
				<div class="error" ng-show="form.driverPassword.$error.required">Enter a password.</div>
				<div class="error" ng-show="form.driverPassword.$error.minlength">Your password is too short.</div>
			</div>
		</div>

		<form name="form" ng-show="ready && !finished" novalidate>

			<div class="input-wrap" ng-show="!driver.hasEmail">
				<span class="label">Email:</span>
				<span class="field"><input type="email" name="driverEmail" ng-model="driver.email" autofocus="autofocus"></span>
			</div>

			<div class="input-wrap">
				<span class="label">Password:</span>
				<span class="field">
					<input ng-show="!check_password" type="password" name="driverPassword" required ng-minlength="5" ng-model="driver.password">
					<input ng-show="check_password" type="text" required ng-minlength="5" ng-model="driver.password">
				</span>
			</div>

			<div class="link no-underline input-wrap-checkbox" ng-click="check_password=!check_password;">
				<span class="checkbox">
					<i ng-show="check_password" class="fa fa-check-square"></i>
					<i ng-show="!check_password" class="fa fa-square"></i>
				</span> Check password
			</div>


			<div class="button-pushable find-restaurants" ng-show="!sending">
				<button class="button orange" ng-click="send()">Save</button>
			</div>

			<div class="button-pushable find-restaurants" ng-show="sending">
				<button class="button"><span><i class="fa fa-spinner fa-spin"></i> Please wait</span></button>
			</div>

		</form>

		<div class="info">
			Cockpit is Crunchbutton's tool of awesomeness. Looking for delivery food? Head over to <a href="http://crunchbutton.com">crunchbutton.com</a>
		</div>

	</div>
</div>
