<section class="section" id="section_content">
    <div class="section-header">
        <h1>Manage User</h1>
    </div>
    <div class="section-body">
        <div class="row">
            <div class="col-sm-12">
                <form id="form_filter_data" action="javascript:void(0);" method="post">
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input class="form-control" id="pencarian" placeholder="Cari Data..." />
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary" style="padding:.5rem .8rem;">Filter Data</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="card">
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-bordered table-striped" id="tbl_manage_user">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Username</th>
                                        <th>Nama Lengkap</th>
                                        <th>User Type</th>
                                        <th>Tgl Update</th>
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- Modal Tambah dan Edit Data-->
<div class="modal fade" tabindex="-1" role="dialog" id="modal_add_edit_user">
    <div class="modal-dialog">
        <form id="form_add_edit_user" action="javascript:void(0);" method="post" data-modul="insert">
            <div class="modal-content" id="modal_content_user">
                <div class="modal-header">
                    <h5 class="modal-title">Tambah data user</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" id="add_edit_modal_body">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label>Username </label>
                                <input type="text" class="form-control" id="username" name="username" />
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label>Nama Lengkap</label>
                                <input type="text" class="form-control" id="nama_lengkap" name="nama_lengkap" />
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label>Password</label>
                                <input type="password" class="form-control" id="password" name="password" />
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label>User Type</label>
                                <select class="form-control" id="user_type" name="user_type">
                                    <option value="0">Administrator</option>
                                    <option value="1">User Biasa</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" id="id_old" name="id_old" />
                    <input type="hidden" id="username_old" name="username_old" />
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">
                        <i class="fas fa-times-circle"></i> Batal
                    </button>
                    <button type="submit" class="btn btn-primary">
                        <i class="fas fa-save"></i> Simpan
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<!-- End of Modal Tambah dan Edit Data -->

<script type="text/javascript" src="<?php echo base_url('assets/userdefined/js/user/manage_user.js');?>"></script>
