<?php
if($this->session->userdata('is_logged_in')===FALSE){
            redirect('login');
}
?>
<div class="templatepopcentering" >
    <div style="border: 1px solid #ffffff;">
        <div id='pop' style="padding:5px;">
        <form id="frm_put_pid_pra_kabul_tolak" name="frm_put_pid_pra_kabul_tolak" class="templatepopform" target="_self" method="POST" action="<?php echo base_url().'c_template_putusan_pidana_pra/cetak_putusan_pra_kabul_tolak';?>">
            <table style="padding:5px;">
                <tr><td colspan="2" class="templatepoptitle">
                <?php 
                    foreach ($template->result() as $template){
                        echo strtoupper($template->namatemplate."<br/>Perkara ".$template->jnsperkara);
                    }
                ?>
                </td></tr>
			    <tr>
                    <td class="templatepopleftcol">Jenis Template Putusan<font color=red>*</font></td>
                    <td style="">
                        <span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;border:#ddd 1px solid' name="jenisTemplate" id="jenisTemplate" class="custom-dropdown__select custom-dropdown__select--white">
                                <option value='-1'>----Pilih Jenis Template----</option>
                                <option  value='1'>1. Putusan Format Kabul</option>
                                <option  value='2'>2. Putusan Format Tolak</option>
                            </select>
                        </span>
                    </td> 
                </tr>
                <tr>
					<td colspan="2" style="background:white;" align="center">
                            <input type="hidden" id="enc" name="enc" value="<?php echo $enc;?>">
                            <input type="button" id="kembali" value="Kembali" class="btn">
							<input type="submit" id="simpan_btn" value="Cetak" class="del_btn">
					</td>
				</tr>
            </table>
        </form>
		</div>
	</div>
</div>
<script type="text/javascript">
$('#kembali').closingFormWin();
$('#frm_put_pid_pra_kabul_tolak').submit(function(e) {
	var jenisTemplate= $('#jenisTemplate').val();
    if(jenisTemplate==-1){
		message_error_show('Silahkan Pilih Jenis Template');
		e.preventDefault();
    }
});
</script>