<div class="container-form-biodata-dioperator akun-container p-5">
	<?= $this->session->flashdata('message') ?>
	<form id="formBiodata">
		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="koreg d-none"></label>
				<input type="hidden" class="form-control form-control-sm form-control-custum" name="koreg" id="koreg"
					value="<?= $formBiodata['koreg'] ?>" readonly>
			</div>
			<div class="col-6 col-lg-6">
				<label for="noDaftar d-none"></label>
				<input type="hidden" class="form-control form-control-sm form-control-custum" name="noDaftar"
					value="<?= $formBiodata['noDaftar'] ?>" readonly>
			</div>
		</div>
		<input type="hidden" name="id" value=" <?= $formBiodata['id'] ?>">
		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="nama">Nama Pendaftar</label>
				<input type="text" class="form-control form-control-sm form-control-custum"
					value="<?= $formBiodata['nama'] ?>" name="nama" id="nama" placeholder="Nama Pendaftar">
			</div>
			<div class="col-6 col-lg-6">
				<label for="nik">NIK</label>
				<input type="text" class="form-control form-control-sm form-control-custum" name="nik" id="nik"
					value="<?= $formBiodata['nik'] ?>">
			</div>
		</div>

		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="nisn">NISN</label>
				<input type="text" class="form-control form-control-sm form-control-custum" name="nisn" id="nisn"
					value="<?= $formBiodata['nisn'] ?>">
			</div>
			<div class="col-6 col-lg-6">
				<label for="email">Email</label>
				<input type="text" class="form-control form-control-sm form-control-custum" name="email" id="email"
					value="<?= $formBiodata['email'] ?>">
			</div>
		</div>

		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="tempatLahir">Tempat Lahir</label>
				<input type="text" class="tempatLahir form-control form-control-sm form-control-custum"
					name="tempatLahir" id="tempatLahir" value="<?= $formBiodata['tempatLahir'] ?>"
					placeholder="Tempat lahir">
			</div>
			<div class="col-6 col-lg-6">
				<label for="tglLahir">Tanggal Lahir</label>
				<input type="text" onkeydown="return false;" autocomplete="off"
					class="tglLahir form-control form-control-sm form-control-custum" id="tglLahir" name="tglLahir"
					value="<?= $formBiodata['tglLahir'] ?>" placeholder="Tanggal lahir">
			</div>
		</div>

		<div class="row my-3">
			<?php
            $provinsiOld = $dataUser['provinsi'];
            $kecamatanOld = $dataUser['kecamatan'];
            $desaOld = $dataUser['desa'];
            $kotaOld = $dataUser['kota'];

            ?>
			<div class="col-6 col-lg-6">
				<label for="jk">Jenis Kelamin</label>
				<select name="jk" id="jk" class="jk form-control form-control-sm">
					<option value="<?= $dataUser['user']['jk'] ?>"><?php if ($dataUser['user']['jk'] == "L") {
                                                                        echo "Laki-laki";
                                                                    } else if ($dataUser['user']['jk'] == "P") {
                                                                        echo "Perempuan";
                                                                    } else {
                                                                        echo "Pilih Jenis Kelamin---";
                                                                    } ?></option>
					<option value="L">Laki-laki</option>
					<option value="P">Perempuan</option>
				</select>
			</div>
			<div class="col-6 col-lg-6">
				<label for="noHp">Nomor Telepon</label>
				<input type="number" id="noHp" class="noHp form-control form-control-sm form-control-custum" name="noHp"
					value="<?= $formBiodata['noHp'] ?>" placeholder="No Handphone">
			</div>
			<div class="col-6 col-lg-6">
				<label for="tinggiBadan">Tinggi Badan</label>
				<input type="number" class="form-control form-control-sm form-control-custum" id="tinggiBadan"
					name="tinggiBadan" value="<?= $formBiodata['tinggiBadan'] ?>" placeholder="Tinggi Badan">
			</div>
			<div class="col-6 col-lg-6">
				<label for="beratBadan">Berat badan</label>
				<input type="number" class="tinggiBadan form-control form-control-sm form-control-custum"
					id="beratBadan" name="beratBadan" value="<?= $formBiodata['beratBadan'] ?>"
					placeholder="Berat Badan">
			</div>
		</div>

		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="agama">Agama</label>
				<select name="agama" id="agama" class="form-control form-control-sm form-control-custum agama">
					<option value="<?= $formBiodata['agama'] ?>"><?= $formBiodata['agama'] ?></option>
					<option value="Islam">Islam</option>
					<option value="Kristen Protestan">Kristen Protestan</option>
					<option value="Kristen Katolik">Kristen Katolik</option>
					<option value="Hindu">Hindu </option>
					<option value="Buddha ">Buddha</option>
					<option value="Konghucu">Konghucu </option>
				</select>
			</div>
			<div class="col-6 col-lg-6">
				<label for="anak_ke">Anak </label>
				<select name="anak_ke" id="anak_ke" class="form-control form-control-sm form-control-custum anak_ke">
					<option value="<?= $formBiodata['anak_ke'] ?>"><?= $formBiodata['anak_ke'] ?></option>
					<option value="Ke-1">Ke-1</option>
					<option value="Ke-2">Ke-2</option>
					<option value="Ke-3">Ke-3</option>
					<option value="Ke-4">Ke-4</option>
					<option value="Ke-5">Ke-5</option>
					<option value="Ke-6">Ke-6</option>
					<option value="Ke-7">Ke-7</option>
					<option value="Ke-8">Ke-8</option>
					<option value="Ke-10">Ke-10</option>
					<option value="Ke-11">Ke-11</option>

				</select>

			</div>
		</div>

		<div class="row my-3">
			<div class="col-6 col-lg-6">
				<label for="sekolahAsal">Asal Sekolah Dasar</label>
				<input type="text" class="sekolahAsal form-control form-control-sm form-control-custum"
					name="sekolahAsal" value="<?= $formBiodata['sekolahAsal'] ?>" placeholder="Asal Sekolah">
			</div>
			<div class="col-6 col-lg-6">
				<label for="npsn">NPSN Asal Sekolah Dasar</label>
				<input type="text" class="npsn form-control form-control-sm form-control-custum" name="npsn"
					value="<?= $formBiodata['npsn'] ?>" placeholder="NPSN Asal Sekolah">
			</div>
		</div>
		<section class="alamat">
			<fieldset>
				<legend>Alamat</legend>

				<div class="row my-3">
					<div class="col-6 col-lg-6">
						<label for="kk">No Kartu Keluarga</label>
						<input type="number" class="kk form-control form-control-sm form-control-custum" id="kk"
							name="kk" value="<?= $formBiodata['kk'] ?>" placeholder="No Kartu Keluarga">
					</div>
					<div class="col-6 col-lg-6">
						<label for="provinsi">Provinsi</label>
						<select name="provinsi" id="provinsi" class="provinsi form-control form-control-sm">
							<option value="<?php $proId = isset($provinsiOld['id']) ? ($provinsiOld['id']) : '';
                                            echo $proId; ?>"><?php $prov = isset($provinsiOld['name']) ? ($provinsiOld['name']) : 'Pilih-Provinsi---';
                                                                echo $prov; ?></option>
							<?php foreach ($provinsi as $prov) : ?>
							<option value="<?= $prov['id'] ?>"> <?= $prov['name'] ?></option>
							<?php endforeach ?>
						</select>
					</div>
				</div>
				<div class="row my-3">
					<div class="col-6 col-lg-6">
						<label for="kota">Kota/Kabupaten</label>
						<select name="kota" id="kota" class="kota form-control form-control-sm">
							<option value="<?php $kotaid = isset($kotaOld['id']) ? ($kotaOld['id']) : '';
                                            echo $kotaid; ?>"><?php $kotaN = isset($kotaOld['name']) ? ($kotaOld['name']) : '';
                                                                echo $kotaN ?></option>
						</select>
					</div>
					<div class="col-6 col-lg-6">
						<label for="kecamatan">Kecamatan</label>
						<select name="kecamatan" id="kecamatan" class="kecamatan form-control form-control-sm">
							<option value="<?php $kecId = isset($kecamatanOld['id']) ? ($kecamatanOld['id']) : '';
                                            echo $kecId; ?>"><?php $kecN = isset($kecamatanOld['name']) ? ($kecamatanOld['name']) : '';
                                                                echo $kecN; ?></option>
						</select>
					</div>
				</div>
				<div class="row my-3">
					<div class="col-6 col-lg-6">
						<label for="desa">Kelurahan/Desa</label>
						<select name="desa" id="desa" class="desa form-control form-control-sm">
							<option value="<?php $desaId = isset($desaOld['id']) ? ($desaOld['id']) : '';
                                            echo $desaId; ?>"><?php $desaN = isset($desaOld['name']) ? ($desaOld['name']) : '';
                                                                echo $desaN; ?></option>
						</select>
					</div>
					<div class="col-6 col-lg-6">
						<div class="row">
							<div class="col-4">
								<label for="rt">RT</label>
								<input type="number" class="form-control form-control-sm form-control-custum" name="rt"
									id="rt" value="<?= $formBiodata['rt'] ?>" placeholder="Rt">
							</div>
							<div class="col-4">
								<label for="rw">RW</label>
								<input type="number" class="form-control form-control-sm form-control-custum" id="rw"
									name="rw" value="<?= $formBiodata['rw'] ?>" placeholder="RW">
							</div>
							<div class="col-4">
								<label for="kodePos">Kode Pos</label>
								<input type="number" class="form-control form-control-sm form-control-custum"
									id="kodePos" name="kodePos" value="<?= $formBiodata['kodePos'] ?>"
									placeholder="Kode Pos contoh 16110">
							</div>
						</div>
					</div>
				</div>
				<div class="row my-3">
					<div class="col-12 col-lg-6">
						<label for="alamat">Alamat Lengkap</label>
						<textarea name="alamat" class="alamat form-control" id="alamat" row="200"
							required><?= $formBiodata['alamat'] ?></textarea>
					</div>
					<div class="col-6 col-lg-6">
						<label for="longitude">Longitude</label>
						<input type="text" class="form-control form-control-sm form-control-custum longitude"
							id="longitude" name="longitude" value="<?= $formBiodata['longitude'] ?>"
							placeholder="Longitude contoh: -6.741584, 106.809561">
					</div>
				</div>
				<div class="row my-1">
					<div class="col-12 col-md-6 offset-md-6">
						<div id="map" style="width:33em; height: 22em; margin-top: 20px;"></div>
						<p>Cari Koodinat <a href="https://www.google.com/maps/@-6.741273,106.8060391,15z?hl=id"
								target="_Blank">disini</a></p>
					</div>
				</div>
			</fieldset>
		</section>
		<button type="submit" class="btn-next save-biodata">Berikutnya</button>
	</form>
</div>
