<div class="change-status-dialog-container zoom-anim-dialog mfp-hide dialog" ng-controller="OrderDeliveryStatusCtrl">

	<h1 class="title"><span>Delivery Status</span></h1>

	<div class="divider"></div>

	<ng-form name="formDeliveryStatus">

		<div class="ul-inputs">

			<ul ng-class="{'submitted':formDeliveryStatusSubmitted}" class="ul-inputs">

				<li class="li-input" ng-if="status.status != 'canceled'">
					<div class="label">Driver</div>
					<div class="input">
						<select ng-model="status.driver.id_admin" ng-change="driverChanged()" name="driver" ng-options="driver.id_admin as driver.name for driver in drivers"></select>
					</div>
					<div class="box-error">
						<small ng-show="formDeliveryStatus.driver.$error.required">Required.</small>
					</div>
				</li>

				<li class="li-input">
					<div class="label">Status</div>
					<div class="input">
						<select ng-model="status.status" name="status" ng-options="_status.value as _status.label for _status in statuses"></select>
					</div>
					<div class="box-error">
						<small ng-show="formDeliveryStatus.status.$error.required">Required.</small>
					</div>
				</li>

				<li class="li-input divider-line" ng-if="status.status != 'canceled'">
					<label class="switch-wrap">
						<input type="checkbox" class="switch" ng-model="notify_customer"/><div></div>
					</label>
					<div class="label">Notify customer about new driver</div>
				</li>
				<li>
				<div ng-class="{'double-cols': showText5MinAwayButton}">
					<button class="button button-empty button-border button-orange button-full" ng-click="text5MinAway();" ng-if="status.status != 'canceled'">
						<span ng-show="text5MinAwaySending"><i class="fa fa-spinner fa-spin"></i>&nbsp;&nbsp;Sending</span>
						<span ng-show="!text5MinAwaySending"><i class="fa fa-clock-o"></i>&nbsp;&nbsp;5 Min Away</span>
					</button>
					<div ng-if="status.status != 'canceled'">
						<br>
					</div>
					<button class="button button-empty button-border button-green button-full" ng-show="!isSaving" ng-click="formDeliveryStatusSave();"><i class="fa fa-save"></i>&nbsp;&nbsp;Save</button>
					<span ng-show="isSaving"><i class="fa fa-spinner fa-spin"></i>&nbsp;&nbsp;Saving</span>
				</div>
				<br><br>
				</li>
			</ul>
		</div>
	</ng-form>
</div>
