  <?= $this->extend('layout/admin') ?>

  <?= $this->section('title') ?>
  <title>PROFILE &mdash; KUA WAY BUNGUR</title>
  <?= $this->endSection() ?>

  <?= $this->section('content') ?>
  <section class="section">
      <div class="section-header">
          <h1>Edit Data Profile</h1>

          <div class="section-header-breadcrumb">
              <div class="breadcrumb-item active"><a href="<?= base_url('dashboard') ?>">Dashboard</a></div>
              <div class="breadcrumb-item active"><a href="<?= base_url('profile') ?>">Profile</a></div>
              <div class="breadcrumb-item">Edit Profile</div>
          </div>
      </div>
      <?php if (session()->getFlashdata('error')) : ?>
      <div class="alert alert-danger alert-dismissible show fade">
          <div class="alert-body">
              <button class="close" data-dismiss="alert">X</button>
              <b>Error !</b>
              <?= session()->getFlashdata('error') ?>
          </div>
      </div>
      <?php endif; ?>

      <div class="section-body">
          <h2 class="section-title">Edit Data Profile</h2>
          <p class="section-lead">
              Halaman edit data.
          </p>

          <div class="row">
              <div class="col-12 col-md-12 col-lg-12">
                  <div class="card">

                      <div class="card-header">
                          <div class="section-header-button">
                              <a href="<?= base_url('profile') ?>" type="button" class="btn btn-info sm">
                                  <i class="fas fa-arrow-left"></i> Kembali
                              </a>
                          </div>
                      </div>
                      <div class="card-body">
                          <form action="<?= base_url('profile') ?>" method="post" enctype="multipart/form-data"
                              autocomplete="off" class="needs-validation" novalidate="">
                              <?= csrf_field() ?>

                              <div class="form-group">
                                  <label>Struktur Organisasi</label>
                                  <input type="file" name="gambar_organisasi" class="form-control"
                                      accept="image/png, image/gif, image/jpeg" required>
                                  <div class="invalid-feedback text-danger">Masukan telpon</div>
                                  <small class="text-muted font-italic">*Maksimal ukuran 1024k</small>
                              </div>
                              <div class="form-group">
                                  <label>Sejarah</label>
                                  <textarea rows="5" name="sejarah" class="summernote-simple form-control"
                                      required><?= $profile->sejarah ?></textarea>
                                  <div class="invalid-feedback text-danger">Masukan sejarah</div>
                              </div>
                              <div class="form-group">
                                  <label>Visi - Misi</label>
                                  <textarea rows="5" name="visi_misi" class="summernote-simple form-control"
                                      required><?= $profile->visi_misi ?></textarea>
                                  <div class="invalid-feedback text-danger">Masukan visi-misi</div>
                              </div>
                              <div class="text-right">
                                  <button type="reset" class="btn btn-secondary">Reset</button>
                                  <button type="submit" class="btn btn-primary"><i class="fas fa-paper-plane"></i>
                                      Simpan</button>

                              </div>
                          </form>
                      </div>

                  </div>
              </div>
  </section>
  <?= $this->endSection() ?>