SHARE
TWEET

Untitled

a guest Sep 23rd, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form id="form_alert_ho" name="form_alert_ho" action="" class="form-horizontal" role="form" method="post" enctype="multipart/form-data">
  2.     <div class="update_message"></div>
  3.     <div class="col-md-12 col-sm-12 col-xs-12">
  4.         <label class="control-label"><?php echo lang('remark') ?> <span class="required">*</span></label>
  5.         <input type="text" class="form-control" name="remark" required="required" value="">
  6.     </div>
  7.     <div class="col-md-12 col-sm-12 col-xs-12">
  8.         <input type="hidden" class="form-control" name="shop_id" id="shop_id" value="<?php echo $shop_id ?>">
  9.         <input type="hidden" class="form-control" name="userid" id="userid" value="<?php echo $userid ?>">
  10.         <input type="hidden" class="form-control" name="task_id" id="task_id" value="<?php echo $task_id ?>">
  11.     </div>
  12.     <div class="clearfix"></div>
  13.     <div class="ln_solid"></div>
  14.     <div class="form-group">
  15.         <div class="col-md-12 col-sm-12 col-xs-12">
  16.             <button type="submit" class="btn btn-success pull-right btn_form" data-loading-text="<i class='fas fa-spinner fa-spin'></i> <?php echo lang('saving') ?>"><i class="fas fa-save"></i> <?php echo lang('btn_save') ?></button>
  17.         </div>
  18.     </div>
  19. </form>
  20. <script>
  21.     $(document).ready(function() {
  22.         $('#form_alert_ho').submit(function(e) {
  23.             e.preventDefault();
  24.             var link = "<?php echo base_url('ho_api/submit_form_alert_ho') ?>",
  25.                 form_selector = $("form[name='form_alert_ho']").serialize();
  26.             console.log(form_selector);
  27.             let response = sendAjax(link, form_selector);
  28.             console.log(response);
  29.  
  30.             if (response.status == true) {
  31.                 var json = {
  32.                     'isMessage': true,
  33.                     'title': 'Succes',
  34.                     'body': 'Success add data!',
  35.                     'type': 'notification',
  36.                 };
  37.                 window.ReactNativeWebView.postMessage(JSON.stringify(json));
  38.             }
  39.         })
  40.     });
  41. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top