<div class="panel panel-default">
	<div class="panel-heading">
		<div class="row">
			<div class='col-sm-6'><?php echo $judul;?></div>
			<div class='col-sm-6' align='right'>

			</div>
		</div>
	</div>
	<?php
	if(isset($_GET['s'])){
		switch($_GET['s']){
			case "true" : $c="success"; break;
			case "false": $c="danger"; break;
		}
			echo"
			<br>
			<div class='container' style='width:100%;'><div class='row'><div class='col-md-12'>
			<div class='alert alert-$c' role='alert'>
				<span class='glyphicon glyphicon-exclamation-sign' aria-hidden='true'></span>
				<span class='sr-only'>Error:</span>
				$_GET[m]
			</div></div></div>
			</div>
			";
	}
	?>	
	<form action="<?=base_url()?>cms/logic/processProses" method="post" data-parsley-validate enctype="multipart/form-data">
		<div class="panel-body">
			<?php if(isset($data['id_process']) && $data['id_process'] != ''): ?> 
				<input type="hidden" name="_id" value="<?=$data['id_process']?>" />
				<input type="hidden" name="action" value="edit" /> 
			<?php endif; ?> 

			<div class="form-group">
				<div class="row">
					<div class="col-sm-3">
						<label class="control-label">Icon<span class="text-danger">*</span></label>
					</div>
					<div class="col-sm-3"> 
						<input type='text' class='form-control' id='icon' name='icon' value='<?=(isset($data['icon']) ? $data['icon'] : '')?>' required>
					</div>
				</div>
			</div>			
			<div class="form-group">
				<div class="row">
					<div class="col-sm-3">
						<label class="control-label">Header<span class="text-danger">*</span></label>
					</div>
					<div class="col-sm-9"> 
						<input type='text' class='form-control' id='header' name='header' value='<?=(isset($data['header']) ? $data['header'] : '')?>' required>
					</div>
				</div>
			</div>			
			<div class="form-group">
				<div class="row">
					<div class="col-sm-3">
						<label class="control-label">Text<span class="text-danger">*</span></label>
					</div>
					<div class="col-sm-9"> 
						<input type='text' class='form-control' id='text' name='text' value='<?=(isset($data['text']) ? $data['text'] : '')?>' required>
					</div>
				</div>
			</div>			
			<div class="form-group">
				<div class="row">
					<div class="col-sm-3">
						<label class="control-label">Status <span class="text-danger">*</span></label>
					</div>
					<div class="col-sm-3"> 
						<select name="status" class="form-control" required>
							<option value="">Select</option>
							<?php  foreach ($status as $key => $value) { ?>
								<option value="<?=$key?>" <?=(isset($data['status']) && $data['status'] == $key) ? 'selected' : ''?>><?=$value?></option>  
							<?php } ?>
						</select>
					</div>
				</div>
			</div>	
		</div> 
		
		<div class="panel-footer">
			<button type="submit" onclick=" " class="btn btn-primary">Proses</button>
			<a href='<?=$url?>process' class='btn btn-default'>Kembali</a>
			<button type="reset" class="btn btn-inverse">Bersihkan</button>
		</div>
	</form>
</div>