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

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

<!--// Area -->
<form id="frmArea" name="frmArea" 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 Area</h3>
					<p></p>
				</div>
			</div>
			<!--// edtAreaName -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtAreaName" type="text" id="edtAreaName" onfocus="showHint('edtAreaName'); \\li();" onblur="hideHint('edtAreaName');" placeholder="Area Name" onkeypress="handleEnter(this, event);" >	
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtAreaName">Area Name</div>
				</div>
			</div>
			<p></p>
			<!-- edtAreaName //-->
			<p></p>
			<!--// selAreaTypeId -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<div class="dropdown">
						<select name="selAreaTypeId" type="select" id="selAreaTypeId" onfocus="showHint('selAreaTypeId');" onblur="hideHint('selAreaTypeId'); validate_selAreaTypeId()" onkeypress="handleEnter(this, event)" placeholder="Area Type Id">
<?php echo(SableDBFunctions::getOptions("area_type", "area_id", "area_type_name", -1)); ?>
						</select>
					</div>
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_selAreaTypeId">Area Type Id</div>
				</div>
			</div>
			<p></p>
			<!-- selAreaTypeId //-->
			<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('/area/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="insertArea();" value="Add Area" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Area //-->
