<!-- Main content -->
<div class="content" id="content">
  <div class='row'>
    <div class='col-lg-12'>
      <div class='panel <?= $web_box_color ?>'>
        <div class='panel-heading'=>
          <h3 class='panel-title bold'>Form Pegawai</h3>
        </div>
        <form action="<?= $action; ?>" method="post" enctype="multipart/form-data">
          <div class='panel-body'>
            <div class='row'>

              <div class='col-md-2'>
                <div class='form-group'>
                  <label for='rfid_ktp'>RFID KTP-EL : </label>
                  <input type="text" class="form-control" name="rfid_ktp" id="rfid_ktp" placeholder="RFID KTP-EL" value="<?= $rfid_ktp; ?>" />
                  <?= form_error('rfid_ktp') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='nip'>NIP : </label>
                  <input type="text" class="form-control" name="nip" id="nip" placeholder="NIP" value="<?= $nip; ?>" />
                  <?= form_error('nip') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='nik'>NIK : </label>
                  <input type="text" class="form-control" name="nik" id="nik" placeholder="NIK" value="<?= $nik; ?>" />
                  <?= form_error('nik') ?>
                </div>
              </div>

              <div class='col-md-4'>
                <div class='form-group'>
                  <label for='nama_pegawai'>Nama Pegawai : </label>
                  <input type="text" class="form-control" name="nama_pegawai" id="nama_pegawai" placeholder="Nama Pegawai" value="<?= $nama_pegawai; ?>" />
                  <?= form_error('nama_pegawai') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='tempat_lahir'>Tempat Lahir : </label>
                  <input type="text" class="form-control" name="tempat_lahir" id="tempat_lahir" placeholder="Tempat Lahir" value="<?= $tempat_lahir; ?>" />
                  <?= form_error('tempat_lahir') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='tanggal_lahir'>Tanggal Lahir : </label>
                  <input type="date" class="form-control" name="tanggal_lahir" id="tanggal_lahir" placeholder="Tanggal Lahir" value="<?= $tanggal_lahir; ?>" />
                  <?= form_error('tanggal_lahir') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='jenis_kelamin'>Jenis Kelamin : </label>
                  <?= cmb_enum('jenis_kelamin', 'pegawai', 'jenis_kelamin', $jenis_kelamin); ?>
                  <?= form_error('jenis_kelamin') ?>
                </div>
              </div>

              <div class='col-md-3'>
                <div class='form-group'>
                  <label for='agama'>Agama : </label>
                  <?= cmb_enum('agama', 'pegawai', 'agama', $agama); ?>
                  <?= form_error('agama') ?>
                </div>
              </div>

              <div class='col-md-4'>
                <div class='form-group'>
                  <label for='status_kawin'>Status Kawin : </label>
                  <?= cmb_enum('status_kawin', 'pegawai', 'status_kawin', $status_kawin); ?>
                  <?= form_error('status_kawin') ?>
                </div>
              </div>

              <div class='col-md-4'>
                <div class='form-group'>
                  <label for='telepon'>Telepon : </label>
                  <input type="number" class="form-control" name="telepon" id="telepon" placeholder="Telepon" value="<?= $telepon; ?>" />
                  <?= form_error('telepon') ?>
                </div>
              </div>

              <div class='col-md-4'>
                <div class='form-group'>
                  <label for='jabatan'>Jabatan : </label>
                  <?= cmb_dinamis3('jabatan', 'jabatan', 'Jabatan', 'jabatan', 'nama_jabatan', 'id_jabatan', $jabatan); ?>
                  <?= form_error('jabatan') ?>
                </div>
              </div>

              <div class='col-lg-12'>
                <div class='form-group'>
                  <label for='alamat'>Alamat : </label>
                  <textarea class="form-control" name="alamat" id="alamat" placeholder="Alamat" rows="3"><?= $alamat; ?></textarea>
                  <?= form_error('alamat') ?>
                </div>
              </div>

              <!-- <div class='col-md-4'>
                <div class='form-group'>
                  <label for='foto_pegawai'>Foto Pegawai : </label>
                  <div class="input-group mb-3">
                    <div class="input-group-prepend">
                      <span class="input-group-text" id="inputGroupFileAddon01"><i class="fa fa-file-alt"></i></span>
                    </div>
                    <div class="custom-file">
                      <input type="file" name="foto_pegawai" class="custom-file-input" id="inputGroupFile01" aria-describedby="inputGroupFileAddon01" onchange="previewImage();">
                      <label class="custom-file-label" for="inputGroupFile01" id="teks-gambar">Choose file</label>
                    </div>
                  </div>
                </div>
              </div> -->
              <!-- <input type="hidden" name="filelama" value="<?= $foto_pegawai; ?>" /> -->
              <input type="hidden" name="id_pegawai" value="<?= $id_pegawai; ?>" />

            </div>
          </div>
          <div class='panel-footer'>
            <button type="submit" class="btn btn-primary  pull-right"><?= $button ?></button>
            <a href="javascript:window.history.go(-1);" class="btn btn-default">Batal</a>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>