125 lines
7.3 KiB
PHP
125 lines
7.3 KiB
PHP
<section class="content-header">
|
|
<h1>
|
|
<small></small>
|
|
</h1>
|
|
<ol class="breadcrumb">
|
|
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
|
<li>Master</li>
|
|
<li><a href="<?php echo base_url()?>index.php/ps_ruangan">Ruang</a></li>
|
|
<li class="active"><?php echo $title;?></li>
|
|
</ol>
|
|
</section>
|
|
<section class="content">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title"><?php echo $title; ?></h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<?php if(validation_errors()){ ?>
|
|
<div id="mydivs" class="alert alert-danger alert-dismissable">
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
|
<?php echo validation_errors() ?>
|
|
</div>
|
|
<script>
|
|
setTimeout(function() {
|
|
$('#mydivs').hide('fast');
|
|
}, 5000);
|
|
</script>
|
|
<?php }
|
|
|
|
$setdisabled ="";
|
|
$setidedit ="";
|
|
$setnama ="";
|
|
$setkode ="";
|
|
$setpelayanan ="";
|
|
$setstatus =1;
|
|
|
|
if ($actionform=="prosesview"){
|
|
$setdisabled="disabled=''";
|
|
}
|
|
if ($actionform!="prosesadd"){
|
|
$setidedit =$ru->row('mr_id');
|
|
$setnama =$ru->row('mr_nama');
|
|
$setkode =$ru->row('mr_kode');
|
|
$setstatus =$ru->row('mr_status');
|
|
$setpelayanan =$ru->row('mr_pelayanan');
|
|
}
|
|
|
|
?>
|
|
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_ruangan/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
|
<div class="box-body">
|
|
<div class="form-group">
|
|
<label for="nama" class="col-sm-2 control-label">Nama</label>
|
|
<div class="col-sm-3">
|
|
<input id="nama" class="form-control" <?php echo $setdisabled; ?> name="nama" type="text" placeholder="Masukan Nama Ruang" autocomplete="off" value="<?php echo $setnama;?>"/>
|
|
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<input id="kode" class="form-control" <?php echo $setdisabled; ?> name="kode" type="text" placeholder="Masukan Kode Ruang" autocomplete="off" value="<?php echo $setkode;?>"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="pelayanan" class="col-sm-2 control-label">Pelayanan</label>
|
|
<div class="col-sm-3">
|
|
<select <?php echo $setdisabled; ?> id="pelayanan" name="pelayanan" class="form-control select" >
|
|
<option >Pilih Jenis Pelayanan</option>
|
|
<option <?php if($setpelayanan==1){echo $select="selected='selected'";}?> value="1">IGD (Instalasi Gawat Darurat)</option>
|
|
<option <?php if($setpelayanan==2){echo $select="selected='selected'";}?> value="2">RAJAL (Rawat Jalan)</option>
|
|
<option <?php if($setpelayanan==3){echo $select="selected='selected'";}?> value="3">RANAP (Rawat INAP)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label"></label>
|
|
<div class="col-sm-2">
|
|
<select onchange="colorchange()" <?php echo $setdisabled; if($setstatus==0){echo "style='background: #feb9b9;'";}else{echo "style='background: #d9fdd3;'";}?> id="status" name="status" class="form-control select" >
|
|
<option style="background: #d9fdd3;" <?php if($setstatus==1){echo $select="selected='selected'";}?> value="1">Active</option>
|
|
<option style="background: #feb9b9;" <?php if($setstatus==0){echo $select="selected='selected'";}?> value="0">Disabled</option>
|
|
</select>
|
|
<script>
|
|
function colorchange(){
|
|
var colsat = document.getElementById('status').value;
|
|
if(colsat==1){
|
|
document.getElementById("status").style.background = "#d9fdd3";
|
|
}else{
|
|
document.getElementById("status").style.background = "#feb9b9";
|
|
}
|
|
}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="box-footer">
|
|
<a href="<?php echo base_url();?>index.php/ps_ruangan" class="btn btn-default">Cancel</a>
|
|
<?php if ($actionform!="prosesview"){ ?>
|
|
<button type="submit" class="btn btn-warning">Submit</button>
|
|
<?php }
|
|
if ($actionform!="prosesview" && $actionform!="prosesadd"){
|
|
if(!empty($this->vardelete)){
|
|
echo "<a onclick='del(".$setidedit.")' class='btn btn-danger pull-right'>Delete</a><input type='hidden' id='isi".$setidedit."' value='".$setnama."'> ";
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<script type="text/javascript">
|
|
var url="<?php echo base_url();?>";
|
|
function del(id){
|
|
var r=confirm("Apakah anda ingin menghapus Ruang ini?")
|
|
if (r==true)
|
|
window.location = url+"index.php/ps_ruangan/delete/"+id;
|
|
else
|
|
return false;
|
|
}
|
|
</script>
|