<div class="centering" style="width:80%;margin-top: 1%;">
        <div id='edit_data_umum' style="background:none;padding:10px; border:1px solid #fff">
                <div style="background:white;padding:5px">
                <div class="detil" style="font-size:14px;margin-top:25px;width: 100%;margin: 0 auto;border-color: #5fb85c;">
                        <form id="frm_diversi_pelaksanaan" style="background:white;margin:0;" method="post" action="<?php echo base_url().'tab_diversi_c/validate_edit_pelaksanaan_kesepakatan_diversi';?>">
                        	<table id='infoPerkara' style="font-size:14px;" >
                        		<col width="25%">
                                <col width="75%">
                                    <tbody>
                                        <tr>
                                            <td colspan="2"><h2 style="text-align:center"><?php echo $namahalaman;?></h2></td>
                                        </tr>
										<tr>
                                            <td id="first-child">Status Pelaksanaan Kesepakatan Diversi<span style="color:red">*</span></td>
                                            <td>
                                                <span class="custom-dropdown custom-dropdown--emerald">
                                                <?php echo  form_dropdown('hasil_laporan_pembimbing_kemasyarakatan', $laporan_pembimbing_masyarakat,$detail_diversi->hasil_lap_pembimbing_masyarakat, 'style="width:300px;height:28px;" class="custom-dropdown__select custom-dropdown__select--white" id="hasil_laporan_pembimbing_kemasyarakatan"'); ?>
                                                </span>
                                            </td>
                                        </tr>
                                    	<tr>
                                    		<td id="first-child">Tanggal Laporan Pembimbing Kemasyarakatan<span style="color:red">*</span></td>
                                    		<td>
                                               <input id="tgl_lap_pembimbing_masyarakat" name="tgl_lap_pembimbing_masyarakat" value="<?php echo $this->tanggalhelper->convertToInputDate($detail_diversi->tgl_lap_pembimbing_masyarakat); ?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun" required> 
                                    		</td>
                                    	</tr>
                                        <tr>
                                            <td id="first-child">Nomor Laporan Pembimbing Kemasyarakatan<span style="color:red">*</span></td>
                                            <td>
                                                <?php $data = array(
                                                              'name'        => 'nomor_laporan_pembimbing_masyarakat',
                                                              'id'          => 'nomor_laporan_pembimbing_masyarakat',
                                                              'value'       => $detail_diversi->nomor_laporan_pembimbing_masyarakat,
                                                              'style'       => 'width:40%',
                                                              'class'       => 'standard-input',
															  'maxlength'	=>	'50',
															  'required'	=> '',
                                                            );

                                                echo form_input($data);
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center" background="#fff">
                                                <input type="button" id='close_form_diversi' value="Kembali" class="btn">
												<?php
												if($detail_diversi->tgl_lap_pembimbing_masyarakat!=NULL){
												?>
												<input type="button" id="hapus" value="Hapus" style="text-decoration:none" class="btn btn-danger">
												<?php } ?>
                                                <input id="simpan" class="btn" type="submit" value="Simpan">
                                            </td>
                                        </tr>
                                    </tbody>
                        	</table>
                            <input type="hidden" id="curr_date" value="<?php echo $current_date;?>">
                            <input type="hidden" id='enc' name='enc' value='<?php echo $enc;?>' >
							<input type="hidden" id='encdiversi' name='encdiversi' value='<?php echo $encdiversi;?>' >
							<input type="hidden" id='namahalaman' name='namahalaman' value="<?php echo $namahalaman;?>" >
							<input type="hidden" id='code' name='code' value='4' >
							<input type="hidden" id='tgl_mulai_pelaksanaan' name='tgl_mulai_pelaksanaan' value='<?php echo $detail_diversi->tgl_pelaksanaan_isi_diversi;?>' >
                        </form>
                </div>
                </div>
        </div>
</div>
<script type="text/javascript">
/*$('#close_form_diversi').closingFormWin();*/
$('#close_form_diversi').click(function(){
    window.open("<?php echo base_url('perkara_detil/'.$enc.'/3');?>","_self");    
});

$('#hapus').ButtonClickHandling({
    refresh:1,
    setRefresh:1,
    clicked:1,
    btnClicked:'#close_form_diversi',
    whenStatus:1,
    actions:'<?php echo base_url();?>tab_diversi_c/hapus_datapart_diversi',
    formName:'#frm_diversi_pelaksanaan',
    actionName:'Hapus Data'
});

    $('#frm_diversi_pelaksanaan').SubmitHandling({
        refresh:'1',
        setRefresh:1,
        divRef:'#konten',
        clicked:1,
        btnClicked:'#close_form_diversi',
        whenStatus:1,
		next_step:1		
    });
    $('#tgl_lap_pembimbing_masyarakat').datepicker({
        beforeShowDay: $.datepicker.noWeekends,
        inline: true,
        showOtherMonths: true,
        dateFormat: 'dd/mm/yy',
        dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
        onSelect: function(dateText, inst) {
            var error = 0;
            var tmp = $(this).val().split("/");
            var tmp2 = $('#curr_date').val().split("/");
            var tmp3 = $('#tgl_mulai_pelaksanaan').val().split("-");

            if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
                message = 'Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal '+$('#curr_date').val();
                error = 1
            }
            if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() < new Date(tmp3[0]+"-"+tmp3[1]+"-"+tmp3[2]+"T00:00:00").getTime())){
                message = 'Tidak Dapat Memilih Kurang Dari Tanggal Mulai Pelaksanaan Kesepakatan Diversi';
                error = 1
            }
            if(error==1){
                message_error_show(message);
                $(this).css("background-color", "red");
            }else{
                $(this).css("background-color", "#dedbdb");
            }
            error = 0;
        }
    });    
    $('.datepicker').ValidateDateInput();
</script>