<?php
	include("vehicle_func.php");
	$hddnVehicleId = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}

?>
<script src="<?php SableGeneralFunctions::printModuleJS('vehicle'); ?>"></script>

<!--// Vehicle -->
<form id="frmVehicle" name="frmVehicle" autocomplete="on">
	<div class="forms">
		<div class="container forms-grids">
			<div class="row forms-grid">
				<div class="col-md-12">
					<h3 class="title"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;Add Vehicle</h3>
					<p></p>
				</div>
			</div>
			<!--// edtVehicleReg -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleReg" type="text" id="edtVehicleReg" onfocus="showHint('edtVehicleReg'); validate_edtVehicleReg();" onblur="hideHint('edtVehicleReg');" placeholder="Vehicle Reg" onkeypress="handleEnter(this, event);" >	
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleReg">Vehicle Reg</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleReg //-->
			<p></p>
			<!--// edtVehicleName -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleName" type="text" id="edtVehicleName" onfocus="showHint('edtVehicleName'); validate_edtVehicleName();" onblur="hideHint('edtVehicleName');" placeholder="Vehicle Name" onkeypress="handleEnter(this, event);" >	
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleName">Vehicle Name</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleName //-->
			<p></p>
			<!--// edtVehicleDesc -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleDesc" type="text" id="edtVehicleDesc" onfocus="showHint('edtVehicleDesc'); validate_edtVehicleDesc();" onblur="hideHint('edtVehicleDesc');" placeholder="Vehicle Desc" onkeypress="handleEnter(this, event);" >	
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleDesc">Vehicle Desc</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleDesc //-->
			<p></p>
			<!--// cbVehicleActive -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<div class="switch">
					<input name="cbVehicleActive" type="checkbox" id="cbVehicleActive" class="form-toggle form-toggle-yes-no" onfocus="showHint('cbVehicleActive');" onblur="hideHint('cbVehicleActive'); validate_cbVehicleActive()" checked placeholder="Active?" onkeypress="handleEnter(this, event)"/>
<label for="cbVehicleActive" data-on="Yes" data-off="No"></label>
					</div>
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_cbVehicleActive">Active?</div>
				</div>
			</div>
			<p></p>
			<!-- cbVehicleActive //-->
			<p></p>
		<!--// buttons -->
			<div class="row forms-grid">
				<div class="col-md-2">
					<input type="button" id="btnCancel" value="Cancel"
					class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/vehicle/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="insertVehicle();" value="Add Vehicle" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Vehicle //-->
