<?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_tun/cetak_template");?>">
			 <table id="" style="padding:5px;">
                <tr>
                    <td colspan="2" class="templatepoptitle"><?php echo $judul;?></td>
                    <input type="hidden" id="enc" name='enc' value="<?php echo $enc;?>">
                    <input type="hidden" id="idjadwal" name='idjadwal' value="<?php echo !empty($idjadwal)?$idjadwal:'';?>">
                    <input type="hidden" id="enc_template" name='enc_template' value="<?php echo $enc_template;?>">
                </tr>
                <tr>
                    <td class="templatepopleftcol"><?php echo $nama_kolom;?></td>
                    <td>
                        <span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;' name="<?php echo $idoption;?>" 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>

                <tr>
                    <td colspan="2" style="background:white;padding-top:10px;padding-bottom:10px;" align="center">
                        <input type="button" id="close_frm_pilihan_ttd" value="Kembali" class="btn">
                        <?php if($isclickable){?>
                            <input type="submit" id="cetak" value="Cetak" class="btn btn-danger">
                        <?php } ?>
                    </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('Pilihan Belum Dipilih');
            e.preventDefault();
        }
    });
    $('#close_frm_pilihan_ttd').closingFormWin();
</script>