<?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="form_relaas" name="" class="templatepopform" target="_self" method="POST" action="<?php echo base_url().'c_template_relaas_agama/cetak_relaas_ikrar';?>">
			<table style="padding:5px;">
            <tr><td colspan="2" class="templatepoptitle">
            <?php 
                echo strtoupper("Surat Panggilan (RELAAS)");
            ?>
            </td></tr>
				<tr>
					<td class="templatepopleftcol">Jurusita<font color=red>*</font></td>
					<td>
						<span class="custom-dropdown custom-dropdown--emerald">
						<select style='width:250px;'  name="nama_jurusita" id="nama_jurusita" class="custom-dropdown__select custom-dropdown__select--white">
                                <option value='-1'>--Pilih Jurusita--</option>
                                <?php
									foreach($datajurusita->result() as $data)
										{
											?><option value='<?php echo $data->nama_gelar.'|'.$data->jabatan; ?>'><?php echo $data->nama_gelar; ?></option><?php
										}
								?>
						</select> 
						</span>
					</td>
				</tr>
				<tr>
                    <td class="templatepopleftcol">Pilih Surat <font color=red>*</font></td>
                    <td>
                        <span class="custom-dropdown custom-dropdown--emerald">
                            <select style='width:250px;'  name="blangko_relaas" id="blangko_relaas" class="custom-dropdown__select custom-dropdown__select--white">
                                <option value='-1'>--Pilih Surat--</option>
                                <?php
									foreach($blangko_relaas->result() as $data)
										{
											?><option value='<?php echo $data->kode; ?>'><?php echo $this->templatehelper->ucname($data->nama); ?></option><?php
										}
								?>
							</select> 
                        </span>
                    </td> 
                </tr>
                <tr>
					<td colspan="2" style="background:white;" align="center">
						<input type="hidden" name="enc" id="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">
$(document).ready(function(){
	$('#kembali').closingFormWin();
	
	$('#form_relaas').submit(function(e) {
		
			if($("#nama_jurusita").val() == '-1'){message_error_show('Silahkan Pilih Nama Jurusita');e.preventDefault();}
			if($("#blangko_relaas").val() == '-1'){message_error_show('Silahkan Pilih Blangko Relaas');e.preventDefault();}
		
	});
});

</script>