<div class="row">
    <div class="col-md-3">
    </div>
    <div class="col-md-6">
        <div class="box box-primary box-solid">
            <div class="box-header with-border">
                <h3 class="box-title">Edit Biodata</h3>
                <!-- /.box-tools -->
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                <?php
                $errors = session()->getFlashdata('errors');
                if (!empty($errors)) { ?>
                    <div class="alert alert-danger alert-dismissible">
                        <h5>Ada Kesalahan !!!</h5>
                        <ul>
                            <?php foreach ($errors as $key => $value) { ?>
                                <li><?= esc($value) ?></li>
                            <?php } ?>
                        </ul>
                    </div>
                <?php } ?>
                <?php
                echo form_open_multipart('biodata/update/' . $biodata['id_biodata']);
                ?>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>Nama </label>
                        <input name="nama_lengkap" value="<?= $biodata['nama_lengkap'] ?>" class="form-control" placeholder="Nama biodata">
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>NIK </label>
                        <input name="nik" value="<?= $biodata['nik'] ?>" class="form-control" placeholder="Nama biodata">
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>Tempat Tanggal Lahir </label>
                        <input name="tempat_tanggal" value="<?= $biodata['tempat_tanggal'] ?>" class="form-control" placeholder="Nama biodata">
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>Agama</label>
                        <select name="id_agama" class="form-control">
                            <option value="<?= $biodata['id_agama'] ?>"><?= $biodata['nama_agama'] ?></option>
                            <?php foreach ($agama as $key => $value) { ?>
                                <option value="<?= $value['id_agama'] ?>"><?= $value['nama_agama'] ?></option>
                            <?php } ?>

                        </select>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>Jenis Kelamin</label>
                        <select name="id_jenis_kelamin" class="form-control">
                            <option value="<?= $biodata['id_jenis_kelamin'] ?>"><?= $biodata['nama_jenis_kelamin'] ?></option>
                            <?php foreach ($jenis_kelamin as $key => $value) { ?>
                                <option value="<?= $value['id_jenis_kelamin'] ?>"><?= $value['nama_jenis_kelamin'] ?></option>
                            <?php } ?>

                        </select>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>Status</label>
                        <select name="id_status" class="form-control">
                            <option value="<?= $biodata['id_status'] ?>"><?= $biodata['nama_status'] ?></option>
                            <?php foreach ($status as $key => $value) { ?>
                                <option value="<?= $value['id_status'] ?>"><?= $value['nama_status'] ?></option>
                            <?php } ?>

                        </select>
                    </div>
                </div>

                <div class="col-sm-6">
                    <div class="form-group">
                        <label>TMT </label>
                        <input name="tmt" value="<?= $biodata['tmt'] ?>" class="form-control" placeholder="tmt">
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label>No.SK TMT</label>
                        <input name="no_sk_tmt" value="<?= $biodata['no_sk_tmt'] ?>" class="form-control" placeholder="No.SK TMT">
                    </div>
                </div>


                <div class="form-group">
                    <button type="submit" class="btn btn-primary">Simpan</button>
                    <a href="<?= base_url('biodata') ?>" class="btn btn-success">Kembali</a>
                </div>

                <?php echo form_close() ?>


            </div>
        </div>
        <!-- /.box -->
    </div>

    <div class="col-md-3">
    </div>
</div>