<div id="page-wrapper">
	<div class="main-page">
		<div class="forms">
			<div class=" form-grids row form-grids-right">
				<div class="widget-shadow " data-example-id="basic-forms"> 
					<div class="form-title">
						<h4>Edit Data Kepegawaian</h4>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12 grids-right widget-shadow">
				<br>
				<ul id="myTabs" class="nav nav-tabs" role="tablist">
					<li role="presentation" class="">
						<a href="#personal" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="false" style="pointer-events:none !important; color:grey;">Personal</a>
					</li>
					<li role="presentation" class="active">
						<a href="#kepegawaian" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile" aria-expanded="true">Kepegawaian</a>
					</li>
					<li role="presentation" class="">
						<a href="#keluarga" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile" aria-expanded="true" style="pointer-events:none !important; color:grey;">Keluarga</a>
					</li>
					<li role="presentation" class="">
						<a href="#pendidikan" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile" aria-expanded="true" style="pointer-events:none !important; color:grey;">Pendidikan</a>
					</li>
					<li role="presentation" class="">
						<a href="#kesehatan" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile" aria-expanded="true" style="pointer-events:none !important; color:grey;">Kesehatan</a>
					</li>
				</ul>
				<div id="myTabContent" class="tab-content">
					<div role="tabpanel" class="tab-pane fade active in" id="kepegawaian" aria-labelledby="home-tab">
						<br>
						<form action="<?php echo base_url();?>Admin/pegawaiEditExec/<?php echo $pegawai->id_pegawai;?>" method="POST" enctype="multipart/form-data">
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">Nama</p>
							</div>
							<div class="col-lg-4">
								<input class="form-control" value="<?php echo $pegawai->nama;?>" type="text" name="nama" disabled>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">NIP/NPP</p>
							</div>
							<div class="col-lg-4">
								<input class="form-control" value="<?php echo ($pegawai->no_pegawai!=NULL ? $pegawai->no_pegawai : "");?>" type="text" name="no_pegawai" disabled>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">Unit Kerja</p>
							</div>
							<div class="col-lg-6">
							  <select class="form-control select2-no-search" name="id_unit_kerja" required>
								<option label="Pilih Salah Satu"></option>
								<?php
									if($kepegawaian == NULL)
									{
										foreach($unit_kerja as $uk)
										{
											?>
											<option value="<?php echo $uk['id_unit_kerja'];?>" ><?php echo $uk['unit_kerja'];?></option>
											<?php
										}
									}
									else
									{
										foreach($unit_kerja as $uk)
										{
											?>
											<option value="<?php echo $uk['id_unit_kerja'];?>" <?php echo ($kepegawaian->id_unit_kerja == $uk['id_unit_kerja'] ? "selected" : "");?>><?php echo $uk['unit_kerja'];?></option>
											<?php
										}
									}
								?>
							  </select>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">Status Kepegawaian</p>
							</div>
							<div class="col-lg-6">
							  <select class="form-control select2-no-search" name="id_status_kepegawaian" required>
								<option label="Pilih Salah Satu"></option>
								<?php
									if($kepegawaian == NULL)
									{
										foreach($status_kepegawaian as $sk)
										{
											?>
											<option value="<?php echo $sk['id_status_kepegawaian'];?>"><?php echo $sk['status_kepegawaian'];?></option>
											<?php
										}
									}
									else
									{
										foreach($status_kepegawaian as $sk)
										{
											?>
											<option value="<?php echo $sk['id_status_kepegawaian'];?>" <?php echo ($kepegawaian->id_status_kepegawaian == $sk['id_status_kepegawaian'] ? "selected" : "");?>><?php echo $sk['status_kepegawaian'];?></option>
											<?php
										}
									}
								?>
							  </select>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">Tahun Masuk</p>
							</div>
							<div class="col-lg-2">
							  <input class="form-control" value="<?php echo ($kepegawaian !=NULL ? $kepegawaian->tahun_masuk : "");?>" type="text" name="tahun_masuk" required>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-2">
							  <p class="mg-b-10">File SPK/SK</p>
							</div>
							<div class="col-lg-6">
							  <div class="custom-file">
								<input type="file" class="form-control" name="foto_spksk">
								<?php
									if($kepegawaian != NULL)
									{
										?>
											<a href="<?php echo base_url();?>assets/pegawai/docs/<?php echo $kepegawaian->foto_spksk;?>" download>Klik di sini untuk mendownload file SPK/SK Anda sebelumnya!</a>
										<?php
									}
								?>
							  </div>
							</div><!-- col-4 -->
						  </div><!-- row -->
						  <br>
						  <div class="row row-sm mg-b-20">
							<div class="col-lg-12">
							  <button type="submit" class="btn btn-primary pull-right" >
								<i class="fa fa-save"></i> Simpan Data Kepegawaian
							  </button>
							  <a href="<?php echo base_url();?>Admin/personal/<?php echo $pegawai->id_pegawai;?>" class="btn btn-danger">
								<i class="fa fa-times"></i> Batal
							  </a>
							</div><!-- col-4 -->
						  </div><!-- row -->
						</form>
					</div>
				</div>
			</div>
			<div class="clearfix"> </div>
		</div>
	</div>
</div>