| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/views/scripts/leaddetail/ |
Upload File : |
<!-- modal for add new followup -->
<div class="modal fade in" id="myModalAddFollowUp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<form method="post" id="followupForm" name="followupForm">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Add Follow Up (<?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?>)</h4>
</div>
<div class="alert alert-success" id="succmsg" style="display:none;">
<strong>Success!</strong>Follow Up has been Added.
</div>
<div class="modal-body">
<div class="col-md-6">
<div class="form-group">
<label>Purpose</label>
<select name="purpose" id="purpose" class="demo-default select-country" placeholder="Select Purpose">
<option value="">Select Purpose</option>
<option value="1">Sales</option>
<option value="2">Payment</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Start Date</label>
<input class="form-control whbg" name="followupstartdate" id="followupstartdate" type="text">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>End Date</label>
<input class="form-control whbg" name="followupenddate" id="followupenddate" type="text">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>To Do Reminder</label>
<input class="form-control whbg number" name="followupreminder" id="followupreminder" type="text" onkeyup="return kp_numeric(event);">
<span style="font-size:9px"><h7>In Minutes</h7></span>
</div>
</div>
<div class="col-md-10">
<div class="form-group cityDiv">
<label>Details</label>
<textarea class="form-control whbg" name="followupdetails" id="followupdetails" type="text" rows="5" cols="10"> </textarea>
</div>
</div>
<div class="col-md-10">
<div class="form-group cityDiv">
<label><input type="checkbox" name="followupmarkasdone" value="0" id="followupmarkasdone" />
Mark as done</label>
</div>
</div>
<div class="clear"></div>
</div>
<div class="modal-footer">
<input type="hidden" name="custsysID" id="custsysID" value="<?php echo $this->customerDetail['CustomerSysId']; ?>">
<input type="hidden" name="followupLeadID" id="followupLeadID" value="<?php echo base64_encode($this->leadDetail['TPSysId']); ?>">
<button type="submit" class="btn btn-warning pull-right submitfollowup">Submit</button>
<button type="button" class="btn btn-primarygray pull-left" data-dismiss="modal">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<!-- end of modal for add new followup-->
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<script src="<?php echo $this->baseUrl('public/assets/js/jquery.datetimepicker.js'); ?>"></script>
<script>
$("#followupstartdate").datetimepicker({
format:'d/m/Y H:i:00',
formatDate:'d/m/Y H:i:00',
onShow:function(ct){
this.setOptions({
minDate:($('#followupenddate').val()!='')?$('#followupenddate').val():false,
});
}
});
$("#followupenddate").datetimepicker({
// minDate:'0d'
format:'d/m/Y H:i:00',
formatDate:'d/m/Y H:i:00',
onShow:function(ct){
this.setOptions({
minDate:($('#followupstartdate').val()!='')?$('#followupstartdate').val():false,
});
}
});
$("#followupForm").validate({
highlight: function (error, element) {
var name = $(element).attr("name");
$("input[name=" + name + "]").removeClass('error');
},
rules:{
'purpose':{
required:true,
},
'followupstartdate':{
required:true,
},
'followupenddate':{
required:true,
},
'followupreminder':{
required:true,
}
},
submitHandler:function(){
var purpose = $.trim($("#purpose").val());
var followupstartdate = $.trim($("#followupstartdate").val());
var followupenddate = $.trim($("#followupenddate").val());
var followupdetails = $.trim($("#followupdetails").val());
var followupreminder=$.trim($("#followupreminder").val());
var custsysID=$.trim($("#custsysID").val());
var lid=$.trim($("#followupLeadID").val());;
var checked=1;
if($("#followupmarkasdone").prop('checked')==true){
var checked=1;
}else{
var checked=0;
}
$.ajax({
url: '/leaddetail/savefollowupdata',
type: 'POST',
dataType:'json',
data: {purpose: purpose, followupstartdate: followupstartdate,custsysID:custsysID,followupenddate:followupenddate,followupdetails:followupdetails,checked:checked,lid:lid,followupreminder:followupreminder},
beforeSend: function(){
$(".submitfollowup").attr('disabled',true);
$(".submitfollowup").html('Please wait...');
},
success: function(result){
if(result.status=='success'){
setTimeout(function(){ location.reload(); },1000);
}else{
$(".submitfollowup").html('Some Error');
}
}
});
}
});
</script>