<div class="centering" style="width:90%;margin-top: 1%;">
	<div id='pihak_pilih' style="border: 1px solid #ffffff;">
		<div class="detil" style="padding: 2px;background-color: white;">
            <div id="sub_title" style="padding:10px;color:#5FB85C;text-align:center;"><?php echo $judul_popup; ?></div>   
            <hr class="thick-line" style="clear:both;">         
			<form id="frm_edit_grasi" style="background:white;margin:0;" method="post" role="form" action="<?php echo base_url().'perkara_grasi/validasiUpdateGrasiPutusanPresiden';?>">
			<table id="tableDetilPerkara">
				<col width="20%">
				<col width="80%">
				<tbody>
					<tr>
						<input type="hidden" id="id" name="id" value="<?php echo $id; ?>">
						<input type="hidden" id="perkara_id" name="perkara_id" value="<?php echo $perkara_id; ?>">
						<input type="hidden" id="curr_date" name="curr_date" value="<?php echo $curr_date; ?>">
					</tr>
					<tr>
						<td style="color:white;">Tanggal Putusan Presiden<font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='tanggal_putusan_presiden' value="<?php echo $tanggal_putusan_grasi; ?>" class="datepicker" placeholder="tgl/bln/tahun" name='tanggal_putusan_presiden' class="standard-input" maxlength="30">
						</td>
					</tr>
					<tr>
						<td style="color:white;">Nomor Putusan Presiden<font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='nomor_putusan_presiden' value="<?php echo $nomor_putusan_grasi; ?>" style="width:300px" name='nomor_putusan_presiden' class="standard-input" maxlength="30">
						</td>
					</tr>
					<tr>
						<td style="color:white;">Isi Keputusan Presiden</td>
						<td style="padding:0px;padding-left:5px;" id="isi_putusan_presiden_text">
						<?php echo $this->ckeditor->editor("isi_putusan_presiden",$amar_putusan_grasi);?>
						</td>
					</tr>
					<tr>
						<td colspan="2" style="background:white;border:0px;" align="center">
						<input type="button" id='kembaliPOPGRASI' value="Kembali" class="btn">
						<?php
						if($amar_putusan_grasi!==''){
                       		if(($pemberitahuan_putusan_grasi=='')||($pemberitahuan_putusan_grasi=='0000-00-00')){
                            	echo '<input type="submit" id="hapusGrasiPutusanPresiden" value="Hapus" class="del_btn" onclick="return false;">';
                            }
                        }
                       	?>
						<input type="submit" id="cetak" value="Simpan" class="btn">
						</td>
					</tr>
				</tbody>
			</table>
			</form>
		</div>
    </div>
</div>
</div>
<script type="text/javascript">
$('#kembaliPOPGRASI').closingFormWin();


$('#frm_edit_grasi').SubmitHandling({
		refresh:'1',
		setRefresh:1,
		divRef:'#konten',
		clicked:1,
		whenStatus:1,
		btnClicked:'#refresh',
		isCKEdit:1,
		tdID:'isi_putusan_presiden_text',
		textID:'isi_putusan_presiden',
	});

    $('#hapusGrasiPutusanPresiden').ButtonClickHandling({
		refresh:'1',
		setRefresh:1,
		divRef:'#konten',
		clicked:1,
		btnClicked:'#refresh',
		whenStatus:1,
		actions:'<?php echo base_url("perkara_grasi/hapus_grasi_putusan/".$perkara_id."");?>',
		formName:'#frm_edit_grasi',
		actionName:'Hapus Data'
	});



$( document ).ready(function() {

	
        
    $( function() {
        $('#tanggal_putusan_presiden').datepicker({
            inline: true,
            showOtherMonths: true,
            dateFormat: 'dd/mm/yy',
            dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
            beforeShowDay: $.datepicker.noWeekends,
            onSelect: function(dateText, inst) {
            	var date = $(this).datepicker('getDate');
            	var dayOfWeek = weekday[date.getDay()];
            	var error = 0;
            	var message ='';
            	if(dayOfWeek=='Sunday' || dayOfWeek=='Saturday'){
            		message ='Tidak Dapat Memilih diluar Hari Kerja.';
            		message_error_show(message);
            		return;
            	}
			}
        });

		
    $('input,select').not('#simpan').keypress(function(event) { return event.keyCode != 13; });
    });
});
</script>

