<?php
include_once 'includes/processes.php';
$Process = new Login_Process;
$pageLink = basename($_SERVER['REQUEST_URI']);
$Process->check_status($pageLink);
$assetData = $Process->getAssetInfo($asset_id);
?> 
  
  
	<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 Asset</h3>
    </div>
	  <form action="asset.php" method="post">
	  <input type="hidden" name="request_scope" value="Station" />
		<div class="modal-body">
			<div class="row">
				<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($assetData->device_id); ?>
						</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($assetData->brand_id); ?>
						</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" value="<?php echo $assetData->model_product_no;  ?>" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="asset_tag">Asset Tag</label>
						<input type="text" id="asset_tag" name="asset_tag" value="<?php echo $assetData->asset_tag;  ?>" class="form-control" required>
					</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" value="<?php echo $assetData->tagging_no;  ?>" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-6">
					<div class="form-group col-sm-12">
						<label for="date_requested">Date Requested</label>
						<input type="date" id="date_requested" name="date_requested" value="<?php echo $assetData->date_requested;  ?>" 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 Received</label>
						<input type="date" id="date_received" name="date_received" value="<?php echo $assetData->date_received;  ?>" placeholder="dd/mm/yyyy" class="form-control" required>
					</div>				
				</div>
				
				<div class="col-sm-12">
					<div class="form-group col-sm-12">
						<label for="item_remark">Remarks</label>
						<textarea name="item_remark" class="form-control"><?php echo $assetData->remarks;  ?></textarea>
					</div>				
				</div>
			</div>			
		</div>
		<div class="modal-footer">
			<button type="submit" name="update-asset" class="btn btn-xs btn-success pull-left"><i class="fa fa-check"></i> Update Asset</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 -->