<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>resources/css/date-css.css" />
<?php
$pihak1 = ($idalurperkara>=111)? 'Jaksa':'Penggugat';
$pihak2 = ($idalurperkara>=111)? 'Terdakwa':'Tergugat';
$option_tgl = array('1' => 'Sama Dengan', 
					'2' => 'Lebih Besar Dari', 
					'3' => 'Lebih Besar Sama Dengan', 
					'4' => 'Kurang Dari',
					'5' => 'Kurang Dari Sama Dengan',
					'6' => 'Antara'
					);
$option_text = array('1' => 'Sama Dengan', 
					'8' => 'Berisi'
					);
?>
<div id='v_search_detil' class="centering" style="width:100%;margin-top: 1%;">
	<div style="padding:20px;"></div>
	<div class="detil" style="margin-top:25px;width: 60%;margin: 0 auto;border-color: #FFFFFF;">
		<h3>PENCARIAN DETIL JADWAL SIDANG</h3>
		<form method="post" id="frm_search_detil" action="<?php echo base_url().'jadwal_sidang_list/search_detail/'.$enc; ?>">
		<table id="tableDetilPerkara" style="background: #dedbdb;">
			<col width="38%">
			<col width="25%">
			<col width="37%">
			<tbody>
				<tr>
					<td>Tanggal</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald" style="width:100%;">
							<?php
								$js="id='tgl_sidang_select' class='custom-dropdown__select custom-dropdown__select--white' style='width:95%;' ";
								echo form_dropdown('tgl_sidang_select', $option_tgl, '1', $js);
							?>
						</span>
					</td>
					<td style="padding:0px;padding-left:5px;"><input id="from_tgl_sidang" name="from_tgl_sidang" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"> <input id= "a_tgl_sidang" class='antara tgl_sidang_select' value="s/d" disabled="true"><input id="to_tgl_sidang" name="to_tgl_sidang" class="datepicker a_date tgl_sidang_select" maxlength="10" placeholder="tgl/bln/tahun"></td>
				</tr>
				<tr>
					<td>Ruangan</td>
					<td style="padding:0px;padding-left:11px;">Sama Dengan</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald" style='width:245px'>
							<select style='width:245px' name="ruangan" id="ruangan" onchange="" class="custom-dropdown__select custom-dropdown__select--white">
								<option value="-1"></option>
								<?php
								if($ruangan_sidang!=''){
									if($ruangan_sidang->num_rows>0){
										foreach ($ruangan_sidang->result() as $row) {
											echo '<option value="'.$row->id.'">'.$this->templatehelper->standradnaming($row->nama).'</option>';
										}
									}
								}
								?>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td>Nomor Perkara</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald" style='width:100%'>
							<?php
								$js="id='no_perkara_select' class='custom-dropdown__select custom-dropdown__select--white' style='width:95%;' ";
								echo form_dropdown('no_perkara_select', $option_text, '8', $js);
							?>
						</span>
					</td>
					<td style="padding:0px;padding-left:5px;"><input id='no_perkara' name='no_perkara' class="standard-input">
					</td>
				</tr>
				<tr>
					<td>Para Pihak</td>
					<td style="padding:0px;padding-left:11px;">Berisi</td>
					<td style="padding:0px;padding-left:5px;"><input id='pihak_para' name='para_pihak' class="standard-input"></td>
				</tr>
				<tr>
					<td>Hakim</td>
					<td style="padding:0px;padding-left:11px;">Sama Dengan</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald" style='width:245px'>
							<select style='width:245px' name="hakim" id="hakim" onchange="" class="custom-dropdown__select custom-dropdown__select--white">
								<option value="-1"></option>
								<?php
								if(!empty($hakim)){
									if($hakim->num_rows>0){
										foreach ($hakim->result() as $row) {
											echo '<option value="'.$row->id.'">'.$this->templatehelper->standradnaming($row->nama_gelar).'</option>';
										}
									}
								}
								?>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td>Panitera Pengganti</td>
					<td style="padding:0px;padding-left:11px;">Sama Dengan</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald" style='width:245px'>
							<select style='width:245px' name="panitera" id="panitera" onchange="" class="custom-dropdown__select custom-dropdown__select--white">
								<option value="-1"></option>
								<?php
								if(!empty($panitera)){
									if($panitera->num_rows>0){
										foreach ($panitera->result() as $row) {
											echo '<option value="'.$row->id.'">'.$this->templatehelper->standradnaming($row->nama_gelar).'</option>';
										}
									}
								}
								?>
							</select>
						</span>
					</td>
				</tr>
				<tr>
					<td>Sidang Keliling</td>
					<td style="padding:0px;padding-left:11px;">Berisi</td>
					<td style="padding:0px;padding-left:5px;">
						<span class="custom-dropdown custom-dropdown--emerald">
							<select name="sidang_keliling" id="sidang_keliling" onchange="" class="custom-dropdown__select custom-dropdown__select--white">
								<option value="-1"></option>
								<option value="Y">Ya</option>
								<option value="T">Tidak</option>
							</select>
						</span>
					</td>
				</tr>
				<input type="hidden" value="<?php echo $enc;?>" name ="enc" id ="enc" class='btn'>
				<tr>
					<td colspan="3" style="background:white;" align="center">
						<input type="submit" onClick='clearAll()' value="Bersihkan" class="btn"></input>
						<input type="submit" value="Cari" class="btn"></input>
						<input type="button" id='close_form_search_detail' value="Kembali" class="btn">
					</td>
				</tr>
			</tbody>
		</table>
	</form>
	</div>
	<div style="padding:25px;"></div>
</div>
<script type="text/javascript">
$('#close_form_search_detail').closingFormWin();
$( function() {
	$('#from_tgl_sidang').datepicker({
      	inline: true,
        showOtherMonths: true,
        dateFormat: 'dd/mm/yy',
        dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
  	});
    $('#to_tgl_sidang').datepicker({
    	inline: true,
        showOtherMonths: true,
        dateFormat: 'dd/mm/yy',
        dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
    });
});

$('.antara').hide()
$('.a_date').hide()

$(this).change(function(e) {
    var val = $('#'+e.target.id).val()
    if(val==6){
    	$('.'+e.target.id).show();
    }else{
    	$('.'+e.target.id).hide();
    }
});

function clearAll(){
	$(':input').not('.btn').val('');
}

$(document).ready(function() {
  $(window).keydown(function(event){
    if(event.keyCode == 13) {
      event.preventDefault();
      return false;
    }
  });
});
</script>
