<?php
include_once 'includes/processes.php';
$Process = new Login_Process;
$pageLink = basename($_SERVER['REQUEST_URI']);
$Process->check_status($pageLink);
?> 
  
  
	<div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h3 class="modal-title"><i class="fa fa-ticket"></i> New Stopgap</h3>
    </div>
	  <form action="stopgap.php" method="post">
	  <input type="hidden" name="request_scope" value="Station" />
		<div class="modal-body">
			<div class="row">
				
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="stopgap_user">Stopgap User.</label>
						<input type="text" id="stopgap_user" name="stopgap_user" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="designation">User Designation</label>
						<input type="text" id="designation" name="designation" class="form-control" required>
					</div>				
				</div>
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="user_location">Location</label>
						<select name="user_location" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<?php $Process->listLocation(); ?>
						</select>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="device_id">Device</label>
						<select name="device_id" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<?php $Process->listDevice(); ?>
						</select>
					</div>
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="brand_id">Brand</label>
						<select name="brand_id" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<?php $Process->listBrand(); ?>
						</select>
					</div>
				</div>
				
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="model_product_no">Model / Product No.</label>
						<input type="text" id="model_product_no" name="model_product_no" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="stopgap_tag">Stopgap Tag</label>
						<select name="stopgap_tag" class="form-control select2-input" data-required="true">
						<option value=""></option>
						<option value="Serial Number">Serial Number</option>
						<option value="Mobile Number">Mobile Number</option>
						<option value="Service Tag">Service Tag</option>
						<option value="IMEI">IMEI</option>
						<option value="PRODUCT KEY">PRODUCT KEY</option>
						<option value="Mac Address">Mac Address</option>
						<option value="Account Number">Account Number</option>
						</select>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="tag_no">Tagging No</label>
						<input type="text" id="tag_no" name="tag_no" class="form-control" required>
					</div>				
				</div>
				
			
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="date_received">Date Given</label>
						<input type="date" id="date_given" name="date_given" placeholder="dd/mm/yyyy" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="date_received">Date Returned</label>
						<input type="date" id="date_returned" name="date_received" placeholder="dd/mm/yyyy" class="form-control">
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="stopgap_status">Status</label>
						<select name="stopgap_status" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<option>Active</option>
							<option>Exited</option>
							<option>On Leave</option>
							<option>Out Of The Country Duties</option>
							<option>Stolen/lost</option>
							<option>Returned</option>
							<option>Damaged</option>
							<option>Re-Allocation</option>
							<option>Undergoing Repair</option>
							<option>Location Not Known</option>
						</select>
					</div>
				</div>
				
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="remark">Remarks</label>
						<textarea name="remark" class="form-control"></textarea>
					</div>				
				</div>
			</div>			
		</div>
		<div class="modal-footer">
			<button type="submit" name="add-stopgap" class="btn btn-xs btn-success pull-left"><i class="fa fa-check"></i> Add Stopgap</button>
			<button type="button" class="btn btn-xs btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>
		</div>
	  </form>
    </div><!-- /.modal-content -->