<div class="card-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <h3 class="title modal-title"></h3>
</div>
<div id="form_input" class="card-body" disabled>
    <input type="hidden" id="id_jabatan" class="form-control" value="<?= ((isset($data)) ? md5($data->id_jabatan) : '') ?>">
    <input type="hidden" id="level_user_lama" class="form-control" value="<?= ((isset($data)) ? $data->level_user : '') ?>">

    <?php
        if (!empty($data->id_jabatan)) { ?>
            <div class="form-group">
                <div class="alert alert-warning" role="alert">
                    <i class="fa fa-info-circle" aria-hidden="true"></i> 
                    <?= $this->lang->line('info_form_jabatan'); ?>
                </div>
            </div>
    <?php } ?>
    <div class="form-group">
        <label><?= $this->lang->line('kode_jabatan') ?> <i class="text-danger">*</i></label>
        <input type="text" id="kd_jabatan" class="form-control" value="<?= ((isset($data)) ? $data->kode_jabatan : '') ?>">
    </div>

    <div class="form-group">
        <label><?= $this->lang->line('nama_jabatan') ?> <i class="text-danger">*</i></label>
        <input type="text" id="nm_jabatan" class="form-control" value="<?= ((isset($data)) ? $data->nama : '') ?>">
    </div>

    <div class="form-group">
        <label>Level User <i class="text-danger">*</i></label>
        <select class="form-control" id="level">
            <option value="0"><?= $this->lang->line('pilih_level') ?></option>
            <?php
            foreach ($level as $xx => $yy) {
            ?>
                <option value='<?= $yy->id ?>' <?= (isset($data->level_user) and $data->level_user == $yy->id) ? 'selected' : '' ?>>Level <?= $yy->urutan . ' - ' . $yy->level ?></option>
            <?php
            }
            ?>
        </select>
    </div>
</div>
<div class="card-footer">
    <div class="row">
        <div class="col-md-6 text-left">
            <div id="message"></div>
        </div>
        <div class="col-md-6 text-right">
            <button id="btn_new_input" class="btn" style="display:none"><?= $this->lang->line('button_form_tambah_baru') ?></button>
            <button class="btn_save ladda-button" data-style="expand-left"></button>
            <?php
                if (!empty($data->id_jabatan)) { ?>
                    <button class="btn btn-danger btn-close" data-dismiss="modal" aria-label="Close"><?= $this->lang->line('button_form_batal') ?></button>
            <?php } ?>
        </div>
    </div>
</div>
