<?php
include_once 'includes/processes.php';
$Process = new Login_Process;
$pageLink = basename($_SERVER['REQUEST_URI']);
$Process->check_status($pageLink);
$itemData = $Process->getItemInfo($_GET['tid']);
?>

	<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-edit"></i> Update Item</h3>
      </div>
	  <form action="it-store.php" method="post">
	  <input type="hidden" name="item_id"  value="<?php echo $itemData->item_id; ?>">
		<div class="modal-body">
			<div class="row">
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="reason">Item Name</label>
						<input type="text" id="item-name" name="item-name" placeholder="Item Name" value="<?php echo $itemData->item_name; ?>" class="form-control" required>
					</div>
					</div> <!-- /.col -->
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="reason">Re-order Level</label>
						<input type="number" id="reorder-level" name="reorder-level" placeholder="Re-order Level" value="<?php echo $itemData->reorder_level; ?>" class="form-control" required />
					</div>
					</div> <!-- /.col -->
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="reason">Measurement Unit</label>
						<input type="text" id="unit-measure" name="unit-measure" placeholder="Unit Measure" value="<?php echo $itemData->unit_measure; ?>" class="form-control" required />
					</div>
					</div> <!-- /.col -->					
			</div>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			<button type="submit" name="update-item" class="btn btn-primary">update Item</button>
		</div>
		</div>
	  </form>
