<?php
if($this->session->userdata('is_logged_in')===FALSE){
    redirect('login');
}
?>
<div class="templatepopcentering" style='top:25%;'>
    <div style="border: 1px solid #ffffff;">
        <div id='pop' style="padding:5px;">        
        <form id="frm_pilihan_ttd" class="templatepopform" method="post" action="<?php echo base_url().'c_template_perdata_pemberitahuan_putusan/cetak_panggil_persiapan_tun';?>">
			 <table id="" style="padding:5px;">
                <tr>
                    <td colspan="2" class="templatepoptitle"><?php echo $judul;?></td>                    
                </tr>
                <tr>
                    <td class="templatepopleftcol"><?php echo $nama_kolom;?></td>
                    <td>
                        <span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;' name="pilihan" id="pilihan" class="custom-dropdown__select custom-dropdown__select--white">
                                <?php
                                    if(!empty($pilihan)){
                                        foreach ($pilihan as $row) {
                                            echo '<option value="'.$row['id'].'">'.$row['nama'].'</option>';
                                        }
                                     }
                                    ?>
                            </select>
                        </span>
                    </td> 
                </tr>
                <?php 
                    $pihak=$this->encrypt->decode(base64_decode($idpihak));
                    if($pihak==3 OR $pihak==4){                        
                ?>
                        <tr>
                            <td class="templatepopleftcol"><?php echo $nama_kolom_ttd;?></td>
                            <td>
                                <span class="custom-dropdown custom-dropdown--emerald">
                                    <select style='width:250px;'  name="penandaT" id="penandaT"  class="custom-dropdown__select custom-dropdown__select--white">                                
                                        <?php                                
                                            if($penandaTangan != ''){
                                                if($penandaTangan->num_rows>0){
                                                    foreach ($penandaTangan->result() as $row) {
                                                        $id = base64_encode($this->encrypt->encode($row->id));
                                                        echo "<option value='".$id."'>".$this->templatehelper->standradnaming($row->namaPanitera)."</option>";
                                                    }
                                                }
                                            }
                                        ?>                                                                                                
                                    </select>
                                </span>
                            </td> 
                        </tr>
                <?php } ?>

                <tr>
                    <td colspan="2" style="background:white;" align="center">
                        <input type="hidden" id="enc" name='enc' value="<?php echo $enc;?>">
                        <input type="hidden" id="idjadwal" name='idjadwal' value="<?php echo $idjadwal;?>">
                        <input type="hidden" id="pihakke" name='pihakke' value="<?php echo $pihakke;?>">                        
                        <input type="hidden" id="idtemplate" name='idtemplate' value="<?php echo $idpihak;?>">
                        <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">
    $('#frm_pilihan_ttd').submit(function(e){
        //e.preventDefault();
        if($('#pilihan').val()==0){
            message_error_show('Data Untuk Dikirim Ke Template Belum Lengkap');
            e.preventDefault();
        }
    });
    $('#kembali').closingFormWin();
</script>