-
Notifications
You must be signed in to change notification settings - Fork 0
/
book_form.php
37 lines (37 loc) · 1.27 KB
/
book_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div class="container-fluid">
<form action="" id="book-form">
<div class="form-group">
<input name="package_id" type="hidden" value="<?php echo $_GET['package_id'] ?>" >
<input type="date" class='form form-control' required name='schedule'>
</div>
</form>
</div>
<script>
$(function(){
$('#book-form').submit(function(e){
e.preventDefault();
start_loader()
$.ajax({
url:_base_url_+"classes/Master.php?f=book_tour",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Book Request Successfully sent.")
$('.modal').modal('hide')
}else{
console.log(resp)
alert_toast("an error occured",'error')
}
end_loader()
}
})
})
})
</script>