<?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-cogs"></i> New Repair</h3>
    </div>
	  <form action="repairs.php" method="post">
		<div class="modal-body">
			<div class="row">
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="item_name">Item Name.</label>
						<input type="text" id="item_name" name="item_name" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="serial_number">Serial Number</label>
						<input type="text" id="serial_number" name="serial_number" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="station_id">Originating Station</label>
						<select name="station_id" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<?php $Process->listStation(); ?>
						</select>
					</div>
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="date_sent_in">Date received from Station</label>
						<input type="date" id="date_sent_in" name="date_sent_in" placeholder="dd/mm/yyyy" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="remark">Item Issue</label>
						<textarea name="item_issue" class="form-control"></textarea>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="date_sent_out">Date Sent for Repair</label>
						<input type="date" id="date_sent_out" name="date_sent_out" placeholder="dd/mm/yyyy" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="status">Status</label>
						<select name="status" class="form-control select2-input" data-required="true">
							<option value=""></option>
							<option value="Sent for Repair">Sent for Repair</option>
							<option value="Returned From Repair">Returned From Repair</option>
							<option value="Sent Back to Station">Sent Back to Station</option>
						</select>
					</div>
				</div>
			</div>			
		</div>
		<div class="modal-footer">
			<button type="submit" name="add-repair" class="btn btn-xs btn-success pull-left"><i class="fa fa-check"></i> Add Repair Item</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 -->