<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>

<div class="container">
    <h4>Edit Supplier</h4>
    <form action="<?= base_url('admin/supplier/update/' . $supplier['id']) ?>" method="post">
        <div class="mb-3">
            <label>Nama</label>
            <input type="text" name="nama" class="form-control" value="<?= esc($supplier['nama']) ?>" required>
        </div>
        <div class="mb-3">
            <label>Email</label>
            <input type="email" name="email" class="form-control" value="<?= esc($supplier['email']) ?>">
        </div>
        <div class="mb-3">
            <label>Kontak Person</label>
            <input type="text" name="kontak_person" class="form-control" value="<?= esc($supplier['kontak_person']) ?>">
        </div>
        <div class="mb-3">
            <label>Telepon</label>
            <input type="text" name="telepon" class="form-control" value="<?= esc($supplier['telepon']) ?>">
        </div>
        <div class="mb-3">
            <label>Alamat</label>
            <textarea name="alamat" class="form-control"><?= esc($supplier['alamat']) ?></textarea>
        </div>
        <button type="submit" class="btn btn-success">Update</button>
        <a href="<?= base_url('admin/supplier') ?>" class="btn btn-secondary">Kembali</a>
    </form>
</div>

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