<td><input type="hidden" id='enc' name='enc' value="<?php echo $enc; ?>"></td>
<td><input type="hidden" id='enc_BB' name='enc_BB' value="<?php echo $enc_BB;?>"></td>

<hr class="thick-line" style="clear:both;">
<div style="padding:20px;"></div>
	<div class="detil" style="font-size:14px;margin-top:25px;width:540px;margin: 0 auto;border-color: #FFFFFF">
		<form id="frm_edit_bb" style="background:white;margin:0;border:1px solid #ddd;padding:10px 0px 10px 20px" method="post" action="<?php echo base_url().'add_barang_bukti/validateEdit';?>">
		<table id="tableDetilPerkara" style="font-size:14px;;">
				<col width="40%">
				<col width="60%">
				<tbody>
					<tr><th colspan="2">EDIT BARANG BUKTI<br><br></th></tr>
					<tr><td colspan="2"><span style="color:white;font-weight:bold">Penerimaan Barang Bukti Oleh Pengadilan</span></b></td></tr>
					<?php 
					foreach ($data_bb->result() as $row) {
					?>
						<td>Tanggal Terima Dari Penuntut Umum<font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input id="tgl_terima" name="tgl_terima" value="<?php echo $this->tanggalhelper->convertToInputDate($row->tanggal_penerimaan);?>" class="datepicker" maxlength="10">
						</td>
					</tr>
						<td>Nomor Perkara<font color="red">&nbsp;(Readonly)</font></td>
						<td hidden><input id='enc_BB' name='enc_BB' value="<?php echo base64_encode($this->encrypt->encode($row->id));?>"></td>
						<td hidden><input id='enc' name='enc' value="<?php echo base64_encode($this->encrypt->encode($row->perkara_id)); ?>"></td>
						<td><input type="text" id='nomor_perkara' name='nomor_perkara' value="<?php echo $row->nomor_perkara; ?>" class="standard-input" style="width:300px;" maxlength="150" readonly="readonly"></td>
					<tr>
						<td valign="top" style="vertical-align:top;">Jenis dan Uraian lengkap Barang Bukti<font color="red">*</font></td>
						<td><textarea class="standard-input" id="jenis_bb" name="jenis_bb"  style="width: 250px; height: 50px;resize: none;width:300px"><?php print $row->jenis_barang_bukti; ?></textarea><td>
					</tr>
					<tr>
						<td >Tempat Penyimpanan</td>
						<td><input type="text" id='tempat_penyimpanan' name='tempat_penyimpanan' value="<?php echo $row->tempat_penyimpanan; ?>" class="standard-input" maxlength="50"  style="width:300px;"></td>
					</tr>
					<tr>
						<td >Tempat Penyerahan</td>
						<td><input type="text" id='tempat_penyerahan' name='tempat_penyerahan' value="<?php echo $row->tempat_penyerahan; ?>" class="standard-input" maxlength="50"  style="width:300px;"></td>
					</tr>
					<tr>
						<td >Nama Penerima<font color="red">*</font></td>
						<td><input type="text" id='nama_penerima' name='nama_penerima' value="<?php echo $row->nama_penerima; ?>" class="standard-input" maxlength="50"  style="width:300px;"></td>
					</tr>
					<tr><td colspan="2"><span style="color:white;font-weight:bold">Penyerahan Kembali Barang Bukti</span></td></tr>
					<tr>					
						<td>Tgl Penyerahan Barang Bukti Setelah Putusan</font></td>
							<td style="padding:0px;padding-left:5px;">
								<input id="tanggal_penyerahan" name="tanggal_penyerahan" value="<?php echo $this->tanggalhelper->convertToInputDate($row->tanggal_penyerahan);?>" class="datepicker" maxlength="10">
						</td>
					</tr>
					<tr>
						<td >Catatan</td>
						<td><input type="text" id='catatan' name='catatan' value="<?php echo $row->catatan_barang_bukti; ?>" class="standard-input" maxlength="50"  style="width:300px;"></td>
					</tr>
					<?php
					}
					?>
					<tr>
						<td colspan="3" style="background:white;" align="center">

							<input id="kembalibb" type="button" onClick='kembali();' value="Kembali" class="btn">
							<input type="button" id="hapus" value="Hapus" style="text-decoration:none" class="btn btn-danger">
							<input type="submit" id="simpan" value="Simpan" class="btn">
						</td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
<script src="<?php echo base_url();?>resources/js/autoNumeric.js"></script>
<script type="text/javascript">

$( document ).ready(function() {
    $( function() {
        $('#tgl_terima').datepicker({
            inline: true,
            showOtherMonths: true,
            dateFormat: 'dd/mm/yy',
            dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
            beforeShowDay: $.datepicker.noWeekends,
            //onSelect: function(dateText, inst) {
        	//}
        });
        $('#tgl_penyerahan').datepicker({
            inline: true,
            showOtherMonths: true,
            dateFormat: 'dd/mm/yy',
            dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
            beforeShowDay: $.datepicker.noWeekends,
            //onSelect: function(dateText, inst) {
        	//}
        });        
    });
});

$('#tanggal_penyerahan').ValidateDateInput();
$('#tgl_terima').ValidateDateInput();


function kembali(){
	window.open("<?php echo $previous;?>","_self");
}


$('#frm_edit_bb').SubmitHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'#kembalibb',
	whenStatus:1
});

$('#hapus').ButtonClickHandling({
    refresh:'1',
    setRefresh:1,
    divRef:'#konten',
    clicked:1,
    btnClicked:'#kembalibb',
    whenStatus:1,
    actions:'<?php echo base_url()?>add_barang_bukti/hapus_barang_bukti/',
    formName:'#frm_edit_bb',
    actionName:'Hapus Data'
});
</script>