<script>
    $("#batas_bawah").inputmask("decimal", {
        // min:0, 
        // inputtype: "text",
        max : 10,
        radixPoint: '.',
        integerDigits: 2,
        digits: 2,
        digitsOptional: true,
        autoGroup: true,
        allowPlus: true,
        allowMinus: false,
        rightAlign: false
    });

    $("#batas_atas").inputmask("decimal", {
        max : 10,
        radixPoint: '.',
        integerDigits: 2,
        digits: 2,
        digitsOptional: true,
        autoGroup: true,
        allowPlus: true,
        allowMinus: false,
        rightAlign: false
    });
</script>


<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_predikat" class="form-control" value="<?= ((isset($data)) ? md5($data->grade.$data->id_company) : '') ?>">

    <div class="form-group">
        <h5>Grade</h5>
        <label><?= $data->grade ?></label>
    </div>
    <div class="form-group">
        <h5>Poin</h5>
        <div class="row">
            <div class="col-md-6">
                <label>Batas Bawah <i class="text-danger">*</i></label>
                <input type="text" id="batas_bawah" class="form-control" value="<?= ((isset($data)) ? $data->batas_bawah : '') ?>">
            </div>

            <div class="col-md-6">
                <label>Batas Atas <i class="text-danger">*</i></label>
                <input type="text" id="batas_atas" class="form-control" value="<?= ((isset($data)) ? $data->batas_atas : '') ?>">
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-12">
                <label>Keterangan <i class="text-danger">*</i></label>
                <input type="text" id="keterangan" class="form-control" value="<?= $data->keterangan ?>">
            </div>
        </div>
    </div>
</div>
<div class="card-footer">
    <div class="row">
        <div class="col-md-8 text-left">
            <div id="message"></div>
        </div>
        <div class="col-md-4 text-right">
            <button id="btn_new_input" class="btn" style="display:none">TAMBAH BARU</button>
            <button class="btn_save ladda-button" data-style="expand-left" onclick="save(this)"></button>
        </div>
    </div>
</div>
