<?php
if($this->session->userdata('is_logged_in')===FALSE){
            redirect('login');
}
?>
<div class="templatepopcentering" style="width:500px;margin-top: 1%;">
    <div id='pop' style="border: 1px solid #ffffff;">
        <div class="detil" style="padding: 4px;background-color: white;"> 
        <form id="frm_relaas_penggugat" style="padding: 4px;background:white;margin:0;" method="post" action="<?php echo base_url().'c_template_mediasi/cetak_relaas_mediasi/'.$enc;?>">
			<table id="" style="padding:10px;">
                <tr>
                    <td colspan="2" style="background:#5fb85c;padding:10px;color:#fff;text-align:center;">
            <?php 
                echo strtoupper($judul."<br/>Perkara ".$jnsperkara);                
            ?>
                    </td>
                </tr>
<tr>
                    <td class="templatepopleftcol">Nama JS/JSP<font color=red>*</font></td>
                    <td>
                        <span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;'  name="idjurusita" id="idjurusita"  class="custom-dropdown__select custom-dropdown__select--white">                                
                                <?php                       
                                if($listJsp != ''){
                                    if($listJsp->num_rows>1){
                                        echo '<option value="-1">Pilih Nama JS/JSP</option>';
                                    }foreach ($listJsp->result() as $row) {
                                        $jurusita_id = base64_encode($this->encrypt->encode($row->jurusita_id));
                                        echo "<option  value='".$jurusita_id."' onClick='cari_jabatan(".$row->jabatan.")' >".$this->templatehelper->standradnaming($row->jurusita_nama)."</option>";
                                    }
                                }
                                ?>
                            </select>
                        </span>
                    </td> 
                </tr>
				<tr>
					<td class="templatepopleftcol"><?php echo $jenisPihakText;?><font color=red>*</font></td>
					<td>
						<span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;'  name="idpihak" id="idpihak" class="custom-dropdown__select custom-dropdown__select--white">                                
                                <?php                                
                                    if($listPihak != ''){
                                        if($listPihak->num_rows>1){
                                            echo '<option value="-1">Pilih Nama '.$jenisPihakText.'</option>';
                                        }foreach ($listPihak->result() as $row) {
                                            $pihak_id = base64_encode($this->encrypt->encode($row->pihak_id));
                                            echo "<option value='".$pihak_id."'>".$this->templatehelper->standradnaming($row->nama)."</option>";
                                        }                                        
                                    }
                                ?>
                            </select>
                            </span>
					</td>
				</tr>
				<tr>
                    <td class="templatepopleftcol">Tanggal Mediasi<font color=red>*</font></td>
                    <td>
                        <input id="tglMediasi" name="tglMediasi" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun" value="<?php echo $tanggalmediasi;?>" disabled>                        
                    </td> 
                </tr>
                <tr>
					<td colspan="2" style="background:white;" align="center">
                        <input type="hidden" id="enc" name = 'enc' value="<?php echo $enc; ?>">
                        <input type="hidden" id="jenispihak" name = 'jenispihak' value="<?php echo $jenispihak; ?>">
                        <input type="hidden" id="encjadwalmediasi" name = 'encjadwalmediasi' value="<?php echo $encjadwalmediasi; ?>">                
						<input type="button" id="kembali" value="Kembali" class="btn" >
						<input type="submit" id="print_btn" value="Cetak" class="btn" >
					</td>
				</tr>
            </table>
            </form>
		</div>
    </div>
</div>
<script type="text/javascript">
	$('#kembali').closingFormWin();
	$('.datepicker').ValidateDateInput();


$('#frm_relaas_penggugat').submit(function(e) {
    var idjurusita = $('#idjurusita').val();
    if(idjurusita==-1){
        message_error_show('Silahkan Pilih Nama Jurusita/Jurusita Pengganti');
        e.preventDefault();
    }
    if($('#jabatanJS').val()==-1){
        message_error_show('Silahkan Pilih Nama Jabatan Jurusita');
        e.preventDefault();
    }
    var idpihak = $('#idpihak').val();
    if(idpihak==-1){
        message_error_show('Silahkan Pilih Nama Pihak');
        e.preventDefault();
    }      
});
</script>
