<?php $this->load->view('template/header'); ?>

<div class="container">
    <div class="card my-5 text-dark bg-light mb-3">
        <div class="card-header">Ubah Password</div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-6">
                    <?= $this->session->flashdata('pesan'); ?>
                    <form action="<?= base_url('auth/password') ?>" method="post">
                        <div class="mb-3">
                            <label for="password_lama" class="form-label">Password Lama</label>
                            <input type="password" class="form-control <?= form_error('password_lama') ? 'is-invalid' : '' ?>" name="password_lama" id="password_lama" value="<?= set_value('password_lama') ?>">
                            <div class="invalid-feedback">
                                <?= form_error('password_lama') ?>
                            </div>
                        </div>
                        <div class="mb-3">
                            <label for="password_baru" class="form-label">Password Baru</label>
                            <input type="password" class="form-control <?= form_error('password_baru') ? 'is-invalid' : '' ?>" name="password_baru" id="password_baru">
                            <div class="invalid-feedback">
                                <?= form_error('password_baru') ?>
                            </div>
                        </div>
                        <div class="mb-3">
                            <label for="ulangi_password" class="form-label">Ulangi Password Baru</label>
                            <input type="password" class="form-control <?= form_error('ulangi_password') ? 'is-invalid' : '' ?>" name="ulangi_password" id="ulangi_password">
                            <div class="invalid-feedback">
                                <?= form_error('ulangi_password') ?>
                            </div>
                        </div>
                        <div class="mt-4">
                            <button type="submit" class="btn btn-success">Ubah</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<?php $this->load->view('template/js'); ?>
<?php $this->load->view('template/footer'); ?>