<script type="text/ng-template" id="selectRouteBachMessageModal.html">
	<form name="form" class="form-horizontal" ng-submit="_selectRoute()" novalidate>
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">
				<i class="ti ti-close"></i>
			</button>
			<h4 class="modal-title">
				Select a Route
			</h4>
		</div>
		<div class="modal-body">
			<p>Fields with <span style="color: #cc0000;">*</span> are required.</p>
			<div class="form-group">
				<label for="employee_route_id" class="col-sm-3 control-label">Employee <span style="color: #cc0000;">*</span></label>
				<div class="col-sm-8">
					<ui-select required on-select="_setEmployee($item)" ng-model="route.employee_id" ng-disabled="disabled" style="width: 100%" name="employee_id">
						<ui-select-match placeholder="Select an employee...">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="employee.id as employee in _employees | filter: $select.search | limitTo: 40">
							<span ng-bind-html="employee.name | highlight: $select.search"></span>
						</ui-select-choices>
					</ui-select>
					<p class="help-block" ng-show="form.employee_id.$touched && form.employee_id.$error.required">Value is required.</p>
				</div>
			</div>
			<div class="form-group">
				<label for="date" class="col-sm-3 control-label">Date <span style="color: #cc0000;">*</span></label>
				<div class="col-sm-8">
					<input type="text" ng-focus="_openCalendar($event, 'date')" class="form-control datepicker" is-open="calendar_opened['date']" datepicker-popup="MM/dd/yyyy" close-text="Close" name="date" id="date" ng-model="route.date" ng-required="true">					
					<p class="help-block" ng-show="form.date.$touched && form.date.$error.required">Value is required.</p>
				</div>
			</div>
		</div>
		<div class="modal-footer">
			<a class="btn btn-danger" ng-click="cancel()">
				<i class="ti ti-close" style="margin-right: 5px;"></i>
				Cancel
			</a>
			<button type="submit" ng-disabled="!form.$valid" class="btn-primary btn">
				<i class="ti ti-share" style="margin-right: 5px;"></i>
				Save
			</button>
		</div>
	</form>
</script>