<?= $this->extend('layout/template') ?>
<?= $this->section('content') ?>

<div class="card">
    <div class="card-header">
        <h3 class="card-title">Tambah Buku</h3>
    </div>

    <form action="<?= base_url('buku/store') ?>" method="post">

        <?= csrf_field(); ?>

        <div class="card-body">

            <div class="form-group">
                <label>Kode Buku</label>
                <input type="text" name="kode_buku" class="form-control" required>
            </div>

            <div class="form-group">
                <label>Judul Buku</label>
                <input type="text" name="judul" class="form-control" required>
            </div>

            <div class="form-group">
                <label>Penulis</label>
                <input type="text" name="penulis" class="form-control" required>
            </div>

            <div class="form-group">
                <label>Penerbit</label>
                <input type="text" name="penerbit" class="form-control">
            </div>

            <div class="form-group">
                <label>Tahun</label>
                <input type="number" name="tahun" class="form-control">
            </div>

            <div class="form-group">
                <label>Rak</label>
                <input type="text" name="rak" class="form-control">
            </div>

            <div class="form-group">
                <label>Kategori</label>

                <select name="kategori" class="form-control">

                    <option>Pelajaran</option>

                    <option>Novel</option>

                    <option>Agama</option>

                    <option>Komputer</option>

                    <option>Ensiklopedia</option>

                    <option>Lainnya</option>

                </select>

            </div>

            <div class="form-group">
                <label>Stok</label>
                <input type="number" name="stok" class="form-control" value="1">
            </div>

        </div>

        <div class="card-footer">

            <button class="btn btn-primary">

                <i class="fas fa-save"></i>

                Simpan

            </button>

            <a href="<?= base_url('buku') ?>" class="btn btn-secondary">

                Kembali

            </a>

        </div>

    </form>

</div>

<?= $this->endSection() ?>