<div class="col-sm-12">
        <!-- begin panel -->
    <div class="panel panel-grey">
        <div class="panel-heading">
            <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-expand"><i class="fa fa-expand"></i></a>
            <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-remove"><i class="fa fa-times"></i></a>
        </div>
        <div class="panel-body">
            <form class="form-horizontal" method="post" action="">
                <div class="form-group m-b-12">
                    <label class="col-md-3 col-form-label control-label">Nama Alat<span class="text-danger">*</span></label>
                    <div class="col-md-7">
                        <input class="form-control" name="nama_alat" id="nama_alat" type="text" placeholder="Masukkan nama alat" value="<?= (!empty($edit)) ? $edit['nama_alat'] : ''; ?>" required>
                    </div>
                    </div>
                    <div class="form-group m-b-12">
                        <label class="col-md-3 col-form-label control-label">Jenis Alat<span class="text-danger">*</span></label>
                        <div class="col-md-7">
                            <select class="form-control select2 jenis_alat" name="jenis_alat" id="jenis_alat" required>
                            <option></option>
                            <?php foreach($jenis_alat as $j) : ?>
                                <option <?= (!empty($edit) && $edit['jenis_alat'] == $j) ? 'selected' : ''; ?> value="<?= $j; ?>"><?= $j; ?></option>
                            <?php endforeach; ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group m-b-12">
                        <label class="col-md-3 col-form-label control-label">Kategori<span class="text-danger">*</span></label>
                        <div class="col-md-7">
                            <select class="form-control select2 kategori" name="kategori" id="kategori" required>
                            <option></option>
                            <?php foreach($kategori as $j) : ?>
                                <option <?= (!empty($edit) && $edit['kategori'] == $j) ? 'selected' : ''; ?> value="<?= $j; ?>"><?= $j; ?></option>
                            <?php endforeach; ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group m-b-12 param-uji">
                        <label class="col-md-3 col-form-label control-label">Jenis Parameter Uji<span class="text-danger">*</span></label>
                        <div class="col-md-7">
                            <select class="form-control select2" name="jenis_uji[]" id="jenis_uji" multiple>
                                <option></option>
                                <?php foreach($parameter_uji as $p) : ?>
                                    <option <?= (!empty($edit) && in_array($p['id'], json_decode($edit['jenis_uji']))) ? 'selected' : ''; ?> value="<?= $p['id']; ?>"><?= $p['nama']; ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group m-b-12">
                        <label class="col-md-3 col-form-label control-label">Keterangan<span class="text-danger">*</span></label>
                        <div class="col-md-7">
                            <input class="form-control" name="keterangan" id="keterangan" type="text" placeholder="Masukkan nama alat" value="<?= (!empty($edit)) ? $edit['keterangan'] : ''; ?>" required>
                        </div>
                    </div>
                        <div class="form-group m-b-12">
                            <label class="col-md-3 col-form-label control-label"></label>
                    <div class="col-md-7">
                        <button class="btn btn-primary" type="submit">Simpan Alat</button>
                        <a class="btn btn-danger" href="<?= site_url('inventaris/peralatan'); ?>">Batal</a>
                    </div>
                </div>
            </form>
        </div>
        <!-- end panel -->
    </div>
</div>