<div class="modal-header">
	<button type="button" class="close" data-ng-click="cancel()">×</button>
	<h3 class="modal-title"><i class="fa fa-calendar"></i>
		@if (isset($admin) && $admin === true)
			Add a new entry
		@else
			Request a new time entry
		@endif
	</h3>
</div>
<form class="form-horizontal" data-ng-submit="save()">
	<div class="modal-body">

		@unless (isset($admin) && $admin === true)
			<div class="alert alert-danger">
				<i class="icon fa fa-exclamation-triangle"></i> <strong>Note:</strong> <em>a manager will have to approve this change.</em>
			</div>
		@endunless


		<div class="form-group">
			<label class="col-sm-3 control-label" for="inputStart">Date</label>
			<div class="col-sm-9 form-inline">
				<select class="form-control" ng-model="selected_date.day" ng-options="o as o for o in DateTime.days" required></select>
				<select class="form-control" ng-model="selected_date.month" ng-options="o.value as o.name for o in DateTime.months" required></select>
				<select class="form-control" ng-model="selected_date.year" ng-options="o as o for o in DateTime.years" required></select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="inputEnd">Time</label>
			<div class="col-sm-9 form-inline">
				<select class="form-control" ng-options="o as o for o in DateTime.hours" ng-model="selected_date.hour" required></select>
				<select class="form-control" ng-options="o as o for o in DateTime.minutes" ng-model="selected_date.minute" required></select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label" for="inputStart">Type</label>
			<div class="col-sm-9">
				<div class="radio">
					<label>
						<input type="radio" name="type" ng-model="data.type" value="in" required> Clock in
					</label>
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="type" ng-model="data.type" value="out" required> Clock out
					</label>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-default" data-ng-click="cancel()" eat-click>Close</button>
		<button class="btn btn-primary">Save changes</button>
	</div>
</form>