<div class="modal fade" id="updateKPIMarketing" tabindex="-1" role="dialog" aria-labelledby="updateKPIMarketingTitle"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="updateKPIMarketingTitle">
                    Update Faktor KPI
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <?php echo form_open_multipart('manager/sistem/kpi_crud'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Nama Komponen</label>
                    <input type="text" class="form-control" id="nm_komp" value="<?= $komponen['nm_komp'] ?>"
                        name="nm_komp" placeholder="Nama Komponen Penentu Nilai KPI" readonly>
                    <input type="text" class="form-control" id="komp_id" name="komp_id" value="<?= $komponen['id'] ?>"
                        placeholder="Nama Komponen Penentu Nilai KPI" required readonly hidden>
                </div>
                <div class="form-group">
                    <label>Faktor Penentu KPI</label>
                    <input type="text" class="form-control" value="<?= $faktor['nm_faktor'] ?>" id="nm_faktor"
                        name="nm_faktor" placeholder="Nama Alias Untuk Faktor Penentu KPI" required>
                    <input type="text" class="form-control" value="<?= $faktor['id'] ?>" id="faktor_id" name="faktor_id"
                        placeholder="Nama Alias Untuk Faktor Penentu KPI" required hidden readonly>
                </div>
                <div class="form-group">
                    <label>Keterangan Faktor</label>
                    <textarea class="form-control" name="ket_faktor" id="ket_faktor"
                        required><?= $faktor['ket_faktor'] ?></textarea>
                </div>
                <div class="form-group">
                    <label>Persentase Kontribusi Faktor</label>
                    <input type="number" step="any" class="form-control" value="<?= $faktor['pers_faktor'] ?>"
                        id="pers_faktor" name="pers_faktor" placeholder="Persentase Kontribusi Faktor" required>
                    <input type="number" step="any" class="form-control" value="<?= $faktor['pers_faktor'] ?>"
                        id="persen_lama" name="persen_lama" value="<?= $faktor['pers_faktor'] ?>"
                        placeholder="Persentase Kontribusi Faktor" required readonly hidden>
                    <small>*Maksimal Kontribusi <?= $faktor['pers_faktor'] ?>%</small>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <?php if ($faktor['sts_faktor'] == 'AKTIF') : ?>
                <button type="submit" id="hapusKPIFaktor" name="hapusKPIFaktor" class="btn btn-danger">Hapus</button>
                <?php else: ?>
                <button type="submit" id="aktifKPIFaktor" name="aktifKPIFaktor" class="btn btn-success">Aktif</button>
                <?php endif;  ?>
                <button type="submit" id="updateKPIFaktor" name="updateKPIFaktor"
                    class="btn btn-primary">Update</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>