<div class="content-wrapper">
	<section class="content-header">
		<h1>Penambahan Pemudik Covid-19</h1>
		<ol class="breadcrumb">
			<li><a href="<?= site_url('hom_sid')?>"><i class="fa fa-home"></i> Home</a></li>
			<li><a href="<?= site_url('covid19')?>"> Daftar Pemudik Saat Covid-19</a></li>
			<li class="active">Penambahan Pemudik Covid-19</li>
		</ol>
	</section>

	<section class="content">
		<div class="box box-info">
			<?php if ($this->CI->cek_hak_akses('u')): ?>
				<div class="box-header with-border">
					<a href="<?= site_url('covid19')?>" class="btn btn-social btn-flat btn-primary btn-sm visible-xs-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block" title="Kembali Ke Daftar Pemudik Saat Covid-19"><i class="fa fa-arrow-circle-o-left"></i> Kembali Ke Daftar Pemudik Saat Covid-19</a>
				</div>
			<?php endif; ?>
			<div class="box-header with-border">
				<h3 class="box-title">Tambahkan Warga Pemudik</h3>
			</div>
			<div class="box-body">
				<form id="main" name="main" method="POST"  class="form-horizontal">

					<div class="form-group" >
						<label class="col-sm-3 control-label required"  for="terdata">NIK / Nama</label>
						<div class="col-sm-4">
							<select class="form-control select2 required" id="terdata" name="terdata"  onchange="formAction('main')" style="width: 100%;">
								<option value="">-- Silakan Masukan NIK / Nama--</option>
								<?php foreach ($list_penduduk as $item):
                                    if ($item['id'] !== ''): ?>
										<option value="<?= $item['id']?>" <?php selected($individu['id'], $item['id']); ?>>Nama : <?= $item['nama'] . ' - ' . $item['info']?></option>
									<?php endif;
                                endforeach; ?>
							</select>
						</div>
						<div class="col-sm-4">
							<a href="#" class="btn btn-social btn-block btn-success btn-sm" data-toggle="modal" data-target="#add-warga">
								<i class="fa fa-plus"></i>
								Tambah Penduduk Non Domisili
							</a>
							<span id="data_h_plus_msg" class="help-block">
								<code>Untuk penduduk pendatang/tidak tetap. Masukkan data di sini.</code>
							</span>
						</div>
					</div>

				</form>
				<div id="form-melengkapi-data-peserta">
					<form id="validasi" action="<?= $form_action?>" method="POST" enctype="multipart/form-data" class="form-horizontal">
						<div class="form-group">
							<label  class="col-sm-3 control-label"></label>
							<div class="col-sm-8">
								 <input type="hidden" name="id_terdata" value="<?= $individu['id']?>" class="form-control input-sm required">
							 </div>
						</div>
						<?php if ($individu): ?>
							<?php include 'donjo-app/views/covid19/konfirmasi_pemudik.php'; ?>
						<?php endif; ?>

						<?php include 'donjo-app/views/covid19/form_isian_pemudik.php'; ?>

					</form>
				</div>
				<div class="box-footer">
					<div class="col-xs-12">
						<button type="reset" class="btn btn-social btn-flat btn-danger btn-sm"><i class="fa fa-times"></i> Batal</button>
						<button type="submit" class="btn btn-social btn-flat btn-info btn-sm pull-right" onclick="$('#'+'validasi').submit();"><i class="fa fa-check"></i> Simpan</button>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>

<div class='modal fade' id='add-warga' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
	<div class='modal-dialog'>
		<div class='modal-content'>
			<div class='modal-header'>
				<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
				<h4 class='modal-title' id='myModalLabel'><i class='fa fa-plus text-green'></i> Tambah Penduduk Pendatang / Tidak Tetap</h4>
			</div>
			<div class='modal-body'>
				<div class="row">
					<?php include 'donjo-app/views/covid19/form_isian_penduduk.php'; ?>
				</div>
			</div>
			<div class='modal-footer'>
				<button type="button" class="btn btn-social btn-flat btn-warning btn-sm" data-dismiss="modal"><i class='fa fa-sign-out'></i> Tutup</button>
				<a class='btn-ok'>
					<button type="submit" class="btn btn-social btn-flat btn-success btn-sm" onclick="$('#'+'form_penduduk').submit();"><i class='fa fa-trash-o'></i> Simpan</button>
				</a>
			</div>
		</div>
	</div>
</div>

