<div class="centering" style="width:450px;margin-top: 1%;">
	<div id='pihak_pilih' style="border: 1px solid #ffffff;">
		<div class="detil" style="padding: 2px;background-color: white;">
		<form id="frm_pilih_anak" style="background:white;margin:0;" method="post" action="<?php echo base_url().'addPihakAnakBlm12Tahun/validateInput';?>">
			<table id="tableDetilPerkara" style="font-size:14px;">
				<col width="41%">
				<col width="59%">
				<tbody>
					<tr>
						<td colspan="2" style='text-align:center;background:white;border:0px;font-size: 20px;color: #648C03;'><?php echo $title; ?></td>
					</tr>
					
					<tr style="display:none;">
						<td>Pihak <font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='pihak' name='pihak' value="<?php echo $pihak_ke_text;?>" class="standard-input" maxlength="10" readonly="readonly" style="width:100px;">
							<input type="hidden" id='pihak_ke' name="pihak_ke" value="<?php echo $pihak_ke;?>">
						</td>
					</tr>
					
					<tr>
						<td>Nama <font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<?php $url = base_url('pihak_list/');?>
							<input type="text" id='fullname' name='fullname' value="<?php echo (!empty($nama) ? $nama : '');?>" class="standard-input" maxlength="255" style="width:150px;" readonly="readonly">
							<input type="button" onClick="<?php echo $popup==5?'popup_form5th':'popup_form2nd'; ?>('<?php echo $url;?>')" value="Cari" style="padding: 7px 0;color:white;background: #7f8c8d;border: 0 none;  -webkit-border-radius: 0 0 0 0;width: 90px;">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Tempat Lahir <?php echo ($pihak_ke==1 && ($this->session->userdata('jenis_pengadilan')!=3))? '<font color="red">*</font>':'';?></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='tempat_lahir' name='tempat_lahir' value="<?php echo (!empty($tempatLahir) ? $tempatLahir : '');?>" class="standard-input" maxlength="255" readonly="readonly"> </td>
					</tr>
										
					<tr class="tr_perorangan">
						<td>Tanggal Lahir <?php echo ($pihak_ke==1 && ($this->session->userdata('jenis_pengadilan')!=3))? '<font color="red">*</font>':'';?></td>
						<td style="padding:0px;padding-left:5px;">
							<input id="tgl_lahir" name="tgl_lahir" value="<?php echo (!empty($tglLahir) ? $tglLahir : '');?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Umur <?php echo ($pihak_ke==1 && ($this->session->userdata('jenis_pengadilan')!=3))? '<font color="red">*</font>':'';?></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='umur' name='umur' value="<?php echo (!empty($umur) ? $umur : '');?>" class="standard-input" maxlength="2" readonly="readonly" style="width:50px;" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Jenis Kelamin <font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='jenis_kelamin' name='jenis_kelamin' value="<?php echo (!empty($sex) ? $sex : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Warga Negara<font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='warga_negara' name='warga_negara' value="<?php echo (!empty($wargaNegara) ? $wargaNegara : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					<tr>
						<td>Alamat <font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<textarea class="standard-input" id="alamat" name = "alamat" maxlength="500" style="width: 245px; height: 70px;resize: none;" readonly><?php echo (!empty($alamat) ? $alamat : '');?></textarea>
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Pekerjaan <font color="red">*</font></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='pekerjaan' name='pekerjaan' value="<?php echo (!empty($pekerjaan) ? $pekerjaan : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Status Kawin <?php echo ($pihak_ke==1 && ($this->session->userdata('jenis_pengadilan')!=3))? '<font color="red">*</font>':'';?></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='statusKawin' name='statusKawin' value="<?php echo (!empty($kawin) ? $kawin : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Pendidikan <?php echo ($pihak_ke==1 && ($this->session->userdata('jenis_pengadilan')!=3))? '<font color="red">*</font>':'';?></td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='pendidikan' name='pendidikan' value="<?php echo (!empty($pendidikan) ? $pendidikan : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					<tr class="tr_perorangan">
						<td>Berkebutuhan Khusus</td>
						<td style="padding:0px;padding-left:5px;">
							<input type="text" id='difabel' name='difabel' value="<?php echo (!empty($difabel) ? $difabel : '');?>" class="standard-input" maxlength="255" readonly="readonly">
						</td>
					</tr>
					
					<tr>
						<td>Keterangan</td>
						<td style="padding:0px;padding-left:5px;border:0px;">
							<textarea class="standard-input" id="keterangan" name ="keterangan" style="width: 245px; height: 70px;resize: none;"><?php echo (!empty($keterangan) ? $keterangan : '');?></textarea>
						</td>
						<input type="hidden" id='enc_id' name="enc_id" value="<?php echo $enc_id;?>">
						<input type="hidden" id='enc_pihak' name="enc_pihak" value="<?php echo (!empty($enc_pihak) ? $enc_pihak : '');?>">
						<input type="hidden" id='enc_register' name="enc_register" value="<?php echo $enc_register;?>">
						<input type="hidden" id='act' name="act" value="<?php echo $enc_act;?>">
						<input type="hidden" id='urutan' name="urutan" value="<?php echo $urutan;?>">
						
					</tr>
					<tr>
						<td colspan="2" style="background:white;border:0px;" align="center">
							<input type="button" id='close_form_add_anak' value="Kembali" class="btn">
							<?php
							$usergroup = $this->session->userdata('idgroup');
							if ($this->authorization->HasRuleEditPendaftaran($idalurperkara, $idperkara) OR $usergroup==20 OR $usergroup==30 OR $usergroup==410 OR $usergroup==420 OR $usergroup==430 OR $usergroup==440 OR $usergroup==450 
								OR $usergroup==460 OR $usergroup==470 OR $usergroup==480 OR $usergroup==1000 OR $usergroup==1010 OR $usergroup==1020 OR $usergroup==1030 OR $usergroup==500){
								$act = $this->encrypt->decode(base64_decode($enc_act));
								if($act=="edit"){
									echo '<input type="submit" id="hapus" value="Hapus" class="btn btn-danger" onclick="return false;"> ';
								}
								echo '<input type="submit" id="simpan" value="Simpan" class="btn">';
							}
							?>
						</td>
						<input type="hidden" id="refresh" class='detil_perkara_refresh' value="0">
					</tr>
				</tbody>
			</table>
		</form>
		</div>
	</div>
</div>
<script type="text/javascript">
$('#close_form_add_anak').click(function(){
    openLoadingDialog();
    window.open('<?php echo $history;?>','_self');
})
// <?php echo $popup==5?'closingForm4thWin':'closingFormWin'; ?>();
$(".detil #refresh").change(function(){
	refreshPihakList()
});
function refreshPihakList(){
	$("#popup_form_2nd").remove();
	popup_form2nd('<?php echo base_url("pihak_list");?>');
}

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

$('#hapus').ButtonClickHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'#close_form_add_anak',
	whenStatus:1,
	actions:'<?php echo base_url()?>addPihakAnakBlm12Tahun/validateDelete',
	formName:'#frm_pilih_anak',
	actionName:'Hapus Data',
	istemplate:1
});
</script>