Advertisement
GILZID

View

Dec 14th, 2019
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title><?php echo SITE_NAME ?> - Tambah User</title>
  7.  
  8. <?php $this->load->view('_partial/head') ?>
  9.  
  10. <!-- DataTables -->
  11. <link rel="stylesheet" href="<?php echo base_url('assets/plugins/datatables-bs4/css/dataTables.bootstrap4.css') ?>">
  12. <link rel="stylesheet" href="<?php echo base_url('assets/plugins/datatables-responsive/css/responsive.bootstrap4.css') ?>">
  13.  
  14. <!-- Toastr -->
  15. <link rel="stylesheet" href="<?php echo base_url('assets/plugins/toastr/toastr.min.css') ?>">
  16. </head>
  17. <body class="hold-transition sidebar-mini">
  18. <div class="wrapper">
  19. <!-- Navbar -->
  20. <?php $this->load->view('_partial/navbar') ?>
  21. <!-- /.navbar -->
  22.  
  23. <!-- Main Sidebar Container -->
  24. <?php $this->load->view('_partial/sidebar') ?>
  25.  
  26. <!-- Content Wrapper. Contains page content -->
  27. <div class="content-wrapper">
  28. <!-- Content Header (Page header) -->
  29. <section class="content-header">
  30. <div class="container-fluid">
  31. <div class="row mb-2">
  32. <div class="col-sm-6">
  33. <h1>Tambah User</h1>
  34. </div>
  35. <div class="col-sm-6">
  36. <ol class="breadcrumb float-sm-right">
  37. <li class="breadcrumb-item"><a href="<?php echo base_url('dashboard') ?>">Dashboard</a></li>
  38. <li class="breadcrumb-item active">Kelola Akun</li>
  39. <li class="breadcrumb-item active">Tambah User</li>
  40. </ol>
  41. </div>
  42. </div>
  43. </div><!-- /.container-fluid -->
  44. </section>
  45.  
  46. <!-- Main content -->
  47. <section class="content">
  48. <div class="row">
  49. <div class="col-12">
  50. <!-- SELECT2 EXAMPLE -->
  51. <div class="card card-default collapsed-card">
  52. <div class="card-header">
  53. <h3 class="card-title">Custom Filter</h3>
  54.  
  55. <div class="card-tools">
  56. <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-plus"></i></button>
  57. </div>
  58. </div>
  59. <!-- /.card-header -->
  60. <div class="card-body" style="display: none;">
  61. <div class="row">
  62. <div class="col-md-4">
  63. <form role="form" id="form-filter">
  64. <div class="form-group">
  65. <label for="nama">Nama</label>
  66. <input type="text" class="form-control" id="nama" placeholder="Nama">
  67. </div>
  68. <div class="form-group">
  69. <label for="username">Username</label>
  70. <input type="text" class="form-control" id="username" placeholder="Username">
  71. </div>
  72. <div class="form-group">
  73. <label for="email">Email</label>
  74. <input type="text" class="form-control" id="email" placeholder="Email">
  75. </div>
  76. <div class="form-group">
  77. <label for="role">Role</label>
  78. <?php echo $form_role ?>
  79. </div>
  80. <div class="form-group">
  81. <label for="status">Status</label>
  82. <?php echo $form_status ?>
  83. </div>
  84. <div class="card-footer float-right">
  85. <button type="button" class="btn btn-danger" id="btn-filter">Reset</button>
  86. <button type="button" class="btn btn-primary " id="btn-reset">Cari</button>
  87. </div>
  88. </form>
  89. </div>
  90. <!-- /.col -->
  91. </div>
  92. <!-- /.row -->
  93. </div>
  94. <!-- /.card-body -->
  95. </div>
  96. <!-- /.card -->
  97. </div>
  98. <div class="col-12">
  99. <div class="card">
  100. <!-- /.card-header -->
  101. <div class="card-body">
  102. <table id="user" class="table table-bordered table-striped dt-responsive nowrap" style="width: 100%;">
  103. <thead>
  104. <tr>
  105. <th>No</th>
  106. <th>Nama</th>
  107. <th>Username</th>
  108. <th>Email</th>
  109. <th>Role</th>
  110. <th>Status</th>
  111. <th>Aksi</th>
  112. </tr>
  113. </thead>
  114. </table>
  115. </div>
  116. <!-- /.card-body -->
  117. </div>
  118. <!-- /.card -->
  119. </div>
  120. <!-- /.col -->
  121. </div>
  122. <!-- /.row -->
  123. </section>
  124. <!-- /.content -->
  125. </div>
  126. <!-- /.content-wrapper -->
  127. <?php $this->load->view('_partial/footer') ?>
  128. </div>
  129. <!-- ./wrapper -->
  130.  
  131. <?php $this->load->view('_partial/js') ?>
  132.  
  133. <!-- DataTables -->
  134. <script src="<?php echo base_url('assets/plugins/datatables/jquery.dataTables.js') ?>"></script>
  135. <script src="<?php echo base_url('assets/plugins/datatables-bs4/js/dataTables.bootstrap4.js') ?>"></script>
  136. <script src="<?php echo base_url('assets/plugins/datatables-responsive/js/dataTables.responsive.min.js') ?>"></script>
  137. <script src="<?php echo base_url('assets/plugins/datatables-responsive/js/responsive.bootstrap4.js') ?>"></script>
  138.  
  139. <!-- Toastr -->
  140. <script src="<?php echo base_url('assets/plugins/toastr/toastr.min.js') ?>"></script>
  141.  
  142. <!-- page script -->
  143. <script type="text/javascript">
  144. var user;
  145. $(document).ready(function() {
  146. user = $('#user').DataTable({
  147. oLanguage: {
  148. sProcessing: "Tunggu Sebentar..."
  149. },
  150. "processing": true,
  151. "serverSide": true,
  152. "order": [],
  153. "ajax": {
  154. "url": "<?php echo base_url('auth/ajax_list') ?>",
  155. "type": "POST",
  156. "data": function(data) {
  157. data.name = $('#nama').val();
  158. data.username = $('#username').val();
  159. data.email = $('#email').val();
  160. data.role_id = $('#role').val();
  161. data.is_active = $('#status').val();
  162. },
  163. },
  164. "columnDefs": [
  165. {
  166. "targets": [ 0 ],
  167. "orderable": false,
  168. },
  169. ],
  170. });
  171.  
  172. $('#btn-filter').click(function() {
  173. user.ajax.reload();
  174. });
  175.  
  176. $('#btn-reset').click(function() {
  177. $('#form-filter')[0].reset();
  178. user.ajax.reload();
  179. });
  180. });
  181. </script>
  182. </body>
  183. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement