<div class="row">
                <div class="col-md-12" id = "formulir">

<script type="text/javascript">
$(document).ready(function(){

  $("#deletion").click(function(e){
       e.preventDefault();
       var ticketnumber = $('#ticketnumberselector').val();
       var brand = $("#brandselector option:selected").val();
       
       var keterangan = $('#keteranganselector').val();
       
         $.ajax({
           type: "POST",
           url: "<?php echo base_url();?>c_modules/deleteticketnumberdeposits", 
           data: {
            ticketnumber:ticketnumber,
            brand:brand,
            keterangan:keterangan
            
           },
           dataType: "text",  
           success: function(data){
                $("#datagrid").html(data);
                }
            });

         // $("#errmsg").html(data);
      })
})
</script>

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!-- <script>
  $( function() {
    $( "#mindateselector" ).datepicker();
  } );

</script> -->

<h1>Delete Ticket Number Deposits<?php if($this->session->userdata('privilege') == 'Admin') {echo $this->session->userdata('brandgroup');}?></h1>


<form  class="form-horizontal" enctype="multipart/form-data"  method="post">
<div class="row">
  <div class="col-md-3">
    <div class="form-group">
      <label for="inputUsername">Tiket Number</label>
      <input type="text" class="form-control mainform" id="ticketnumberselector" name="ticketnumberselector">
    </div>
  </div>
  
  
  <div class="col-md-3">
    <div class="form-group">
      <label>Brand</label>
      <select id = "brandselector" name="brandselector" class="form-control mainform" style="width: 100%;">
        <?php 
            foreach($brandlist as $row)
            { 
         ?>
            <option  value="<?php echo $row->brand;?>"><?php echo $row->brand;?></option>
        <?php }?>
      </select>
    </div>
  </div>
  
  <div class="col-md-3">
    <div class="form-group">
      <label for="inputUsername">Keterangan</label>
      <input type="text" class="form-control mainform" id="keteranganselector" name="keteranganselector">
    </div>
  </div>
  
  
</div>

<div id = "errmsg" class = "mt-4">
                
</div>

<div class="card-footer">
  <button id = "deletion" type="submit" class="btn btn-primary">Delete</button>
</div>
</form>
</div>
</div>

<div class="row">
    <div class="col-md-12" id = "datagrid">
    </div>
</div>