710 lines
29 KiB
PHP
710 lines
29 KiB
PHP
<?php include 'includes/header.php';?>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="<?=base_url();?>fassets/source/style.css">
|
|
<?php $primaryid=$this->session->userdata('primaryid');
|
|
$userrole=$this->session->userdata('userrole');
|
|
$loggedname=$this->session->userdata('loggedname');
|
|
$loggedmobile=$this->session->userdata('loggedmobile');
|
|
$loggedpincode=$this->session->userdata('loggedpincode');
|
|
$loggeddob=$this->session->userdata('loggeddob');
|
|
$loggedgender=$this->session->userdata('loggedgender');
|
|
$loggedcarno=$this->session->userdata('loggedcarno');
|
|
$loggedbikeno=$this->session->userdata('loggedbikeno');
|
|
$loggedcompanyno=$this->session->userdata('loggedcompanyno');
|
|
$loggedcountry=$this->session->userdata('loggedcountry');
|
|
$loggedleavingdate=$this->session->userdata('loggedleavingdate');
|
|
$loggedreturndate=$this->session->userdata('loggedreturndate');
|
|
?>
|
|
<style>
|
|
.modal-backdrop.show {
|
|
opacity: 0.25;
|
|
}
|
|
.flex-form
|
|
{
|
|
background-color: rgb(26, 188, 156);
|
|
height: 64px;
|
|
width: 750px;
|
|
}
|
|
.flex-form .row{
|
|
padding:15px;
|
|
}
|
|
.fbox-light .fbox-icon:hover img {
|
|
border: 1px solid #E5E5E5;
|
|
background-color: #fff;
|
|
color: #e31e24;
|
|
box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.5);
|
|
</style>
|
|
<section id="slider" class="slider-element slider-parallax revslider-wrap overflow-hidden clearfix">
|
|
<div class="container-fluid header_bg">
|
|
<div class="container header_sec">
|
|
<h1>Switch to Digit Insurance</h1>
|
|
<p>Trusted by 2 crore Indians</p>
|
|
|
|
<ul class="nav nav-pills" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" data-id="1" data-bs-toggle="pill" href="#menu">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/1.png" class="img-fluid" alt="Health"></span><br>
|
|
Life
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link " data-id="2" data-bs-toggle="pill" href="#menu1">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/1.png" class="img-fluid" alt="Health"></span><br>
|
|
Health
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-id="3" data-bs-toggle="pill" href="#menu2">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/2.png" class="img-fluid" alt="Car"></span><br>
|
|
Car
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-id="4" data-bs-toggle="pill" href="#menu3">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/3.png" class="img-fluid" alt="Bike"></span><br>
|
|
Bike
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-id="5" data-bs-toggle="pill" href="#menu4">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/4.png" class="img-fluid" alt="Commercial"></span><br>
|
|
SME
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-id="6" data-bs-toggle="pill" href="#menu5">
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/5.png" class="img-fluid" alt="Travel"></span><br>
|
|
Travel
|
|
</a>
|
|
</li>
|
|
<!-- <li class="nav-item">
|
|
<a class="nav-link" data-bs-toggle="modal" data-bs-target="#menu6" >
|
|
<span><img src="<?=base_url();?>fassets/images/home/product_icons/6.png" class="img-fluid" alt="More Product"></span><br>
|
|
More Product
|
|
</a>
|
|
</li>-->
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div id="menu" class="container tab-pane active"><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/1" method="POST">
|
|
<div class="col-2 form-group">
|
|
<label>Pin Code</label>
|
|
<input type="text" class="form-control" value="<?=$loggedpincode;?>" name="lifepincode" data-validation="number length" data-validation-length="6" placeholder="Enter Pincode">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label>Name </label>
|
|
<input type="text" class="form-control" value="<?=$loggedname;?>" name="lifename" data-validation="required" placeholder="Your Name">
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<label>Date Of Birth </label>
|
|
<input type="text" class="form-control" value="<?=$loggeddob;?>" name="lifedob" id="lifedateofbirth" placeholder="MM/DD/YYYY" data-validation="required">
|
|
<div id="lifeage" style="color:#e31e24"> </div><input type="hidden" name="lifeage" id="life_age" >
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label> Mobile Number </label>
|
|
<input type="text" class="form-control" value="<?=$loggedmobile;?>" name="lifemobile" data-validation="number length" data-validation-length="10" placeholder="Enter Mobile No.">
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row pb-5">
|
|
<div class="col-6">
|
|
<h2>Port my existing Policy <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
</div>
|
|
<div class="col-6 text-right">
|
|
<div class="form-group form-check">
|
|
<label class="form-check-label">
|
|
<input class="form-check-input" type="checkbox" checked> I agree to the <a href="">Terms & Conditions</a>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="menu1" class="container tab-pane "><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/2" method="POST">
|
|
<div class="col-2 form-group">
|
|
<label>Pin Code</label>
|
|
<input type="text" class="form-control" value="<?=$loggedpincode;?>" name="healthpincode" data-validation="number length" data-validation-length="6" placeholder="Enter Pincode">
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<label>Name </label>
|
|
<input type="text" class="form-control" value="<?=$loggedname;?>" name="healthname" data-validation="required" placeholder="Your Name">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label>Gender </label>
|
|
<div class="form-check-inline">
|
|
<label class="radio_sec">Male
|
|
<input type="radio" data-validation="required" name="radio" <?php if($loggedgender=="Male") {?> checked <?php } ?>value="Male" class="healthgen">
|
|
<span class=" checkmark"></span>
|
|
</label>
|
|
</div>
|
|
<div class="form-check-inline">
|
|
<label class="radio_sec">Female
|
|
<input type="radio" name="radio" data-validation="required" class="healthgen" <?php if($loggedgender=="Female") {?> checked <?php } ?> value="Female">
|
|
<span class=" checkmark"></span>
|
|
</label>
|
|
</div>
|
|
<input type="hidden" name="healthradio" id="healthradio" value="<?=$loggedgender;?>">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label> Mobile Number </label>
|
|
<input type="text" class="form-control" value="<?=$loggedmobile;?>" name="healthmobile" data-validation="number length" data-validation-length="10" placeholder="Enter Mobile No.">
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row pb-5">
|
|
<div class="col-6">
|
|
<h2>Port my existing Policy <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
</div>
|
|
<div class="col-6 text-right">
|
|
<div class="form-group form-check">
|
|
<label class="form-check-label">
|
|
<input class="form-check-input" type="checkbox" checked> I agree to the <a href="">Terms & Conditions</a>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="menu2" class="container tab-pane fade"><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/3" method="POST">
|
|
<div class="col-3 form-group">
|
|
<label>Pincode</label>
|
|
<input type="text" class="form-control" value="<?=$loggedpincode;?>" name="carpincode" data-validation="number length" data-validation-length="6" placeholder="Enter Pincode">
|
|
</div>
|
|
<div class="col-4 form-group">
|
|
<label>Enter Your Car Registration number</label>
|
|
<input type="text" class="form-control" name="carregister" value="<?=$loggedcarno;?>" data-validation="required" placeholder="E.g. KA04DK8337">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label> Mobile Number</label>
|
|
<div class="add_extension">
|
|
<span>+91 </span>
|
|
<input type="text" class="form-control" value="<?=$loggedmobile;?>" name="carmobile" data-validation="number length" data-validation-length="10" placeholder="Enter mobile number">
|
|
</div>
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
<div class="row pb-5">
|
|
<div class="col-6">
|
|
<h2>DON'T KNOW YOUR CAR NUMBER? <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
<h2>or renew digit policy <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
</div>
|
|
<div class="col-6 text-right">
|
|
<div class="form-group form-check">
|
|
<label class="form-check-label">
|
|
<input class="form-check-input" type="checkbox" checked> I agree to the <a href="">Terms & Conditions</a>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="menu3" class="container tab-pane fade"><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/4" method="POST">
|
|
<div class="col-3 form-group">
|
|
<label>Pincode</label>
|
|
<input type="text" class="form-control" value="<?=$loggedpincode;?>" name="bikepincode" data-validation="number length" data-validation-length="6" placeholder="Enter Pincode">
|
|
</div>
|
|
<div class="col-4 form-group">
|
|
<label>Registration number</label>
|
|
<input type="text" class="form-control" name="bikeregister" value="<?=$loggedbikeno;?>" data-validation="required" placeholder="E.g. KA04DK8337">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label> Mobile Number</label>
|
|
<div class="add_extension">
|
|
<span>+91 </span>
|
|
<input type="text" class="form-control" value="<?=$loggedmobile;?>" name="bikemobile" data-validation="number length" data-validation-length="10" placeholder="Enter mobile number">
|
|
</div>
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
<div class="row pb-5">
|
|
<div class="col-12">
|
|
<h2>DON'T KNOW REGISTRATION NUMBER? <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
<h2>IT'S A NEW BIKE <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
<h2>OR RENEW DIGIT POLICY <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="menu4" class="container tab-pane fade"><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/5" method="POST">
|
|
<div class="col-3 form-group">
|
|
<label>Pincode</label>
|
|
<input type="text" class="form-control" value="<?=$loggedpincode;?>" name="smepincode" data-validation="number length" data-validation-length="6" placeholder="Enter Pincode">
|
|
</div>
|
|
<div class="col-4 form-group">
|
|
<label>Company Registration number</label>
|
|
<input type="text" class="form-control" name="smeregister" value="<?=$loggedcompanyno;?>" data-validation="required" placeholder="E.g. KA04DK8337">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label> Mobile Number</label>
|
|
<div class="add_extension">
|
|
<span>+91 </span>
|
|
<input type="text" class="form-control" value="<?=$loggedmobile;?>" name="smemobile" data-validation="number length" data-validation-length="10" placeholder="Enter mobile number">
|
|
</div>
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
<div class="row pb-5">
|
|
<div class="col-6">
|
|
<h2>DON'T KNOW YOUR REGISTRATION NUMBER <i class="fa fa-chevron-right" aria-hidden="true"></i> </h2>
|
|
</div>
|
|
<div class="col-6 text-right">
|
|
<div class="form-group form-check">
|
|
<label class="form-check-label">
|
|
<input class="form-check-input" type="checkbox" checked> I agree to the <a href="">Terms & Conditions</a>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="menu5" class="container tab-pane fade"><br>
|
|
<form class="row form_sec" action="<?=base_url();?>category/view-price/6" method="POST">
|
|
<div class="col-4 form-group">
|
|
<label>Which countries are you visiting?</label>
|
|
<input type="text" class="form-control" name="country" value="<?=$loggedcountry;?>" data-validation="required" placeholder="Search country / Global">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label>Leaving date</label>
|
|
<input type="text" class="form-control" id="Leaving" name="Leaving" value="<?=$loggedleavingdate;?>" placeholder="MM/DD/YYYY">
|
|
</div>
|
|
<div class="col-3 form-group">
|
|
<label>Return date</label>
|
|
<input type="text" class="form-control" id="Return" name="Return" value="<?=$loggedreturndate;?>" placeholder="MM/DD/YYYY">
|
|
</div>
|
|
<div class="col-2 form-group">
|
|
<input type="submit" class="btn btn-danger" value="View Prices">
|
|
</div>
|
|
</form>
|
|
<div class="row pb-5"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
<!-- Content
|
|
============================================= -->
|
|
<section id="content">
|
|
<div class="content-wrap">
|
|
<div class="container clearfix">
|
|
<div class="heading-block center">
|
|
<h3>Our Products</h3>
|
|
|
|
</div>
|
|
|
|
<section id="content">
|
|
<div class="content-wrap">
|
|
<div class="container clearfix clicked_tab_policy">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</section><!-- #content end -->
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section">
|
|
<div class="container clearfix">
|
|
<div class="heading-block center">
|
|
<h2>Features that you are gonna Love</h2>
|
|
<span>Canvas comes with 100+ Feature oriented Shortcodes that are easy to use too.</span>
|
|
</div>
|
|
|
|
<div class="row justify-content-center col-mb-50">
|
|
<div class="col-sm-6 col-lg-4">
|
|
<div class="feature-box fbox-sm fbox-plain" data-animate="fadeIn">
|
|
<div class="fbox-icon">
|
|
<a href="#"><i class="icon-phone2"></i></a>
|
|
</div>
|
|
<div class="fbox-content">
|
|
<h3>Low premium</h3>
|
|
<p>Powerful Layout with Responsive functionality that can be adapted to any screen size.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-lg-4">
|
|
<div class="feature-box fbox-sm fbox-plain" data-animate="fadeIn" data-delay="200">
|
|
<div class="fbox-icon">
|
|
<a href="#"><i class="icon-eye"></i></a>
|
|
</div>
|
|
<div class="fbox-content">
|
|
<h3>Hassle Free Claims</h3>
|
|
<p>Looks beautiful & ultra-sharp on Retina Displays with Retina Icons, Fonts & Images.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-lg-4">
|
|
<div class="feature-box fbox-sm fbox-plain" data-animate="fadeIn" data-delay="400">
|
|
<div class="fbox-icon">
|
|
<a href="#"><i class="icon-star2"></i></a>
|
|
</div>
|
|
<div class="fbox-content">
|
|
<h3>Easy and Quick</h3>
|
|
<p>Optimized code that are completely customizable and deliver unmatched fast performance.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="container clearfix">
|
|
|
|
<div class="row col-mb-50 mb-0">
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="heading-block fancy-title border-bottom-0 title-bottom-border">
|
|
<h4>Why choose <span>Us</span>.</h4>
|
|
</div>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quasi quidem minus id omnis, nam expedita, ea fuga commodi voluptas iusto, hic autem deleniti dolores explicabo labore enim repellat earum perspiciatis.</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="heading-block fancy-title border-bottom-0 title-bottom-border">
|
|
<h4>Our <span>Mission</span>.</h4>
|
|
</div>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quasi quidem minus id omnis, nam expedita, ea fuga commodi voluptas iusto, hic autem deleniti dolores explicabo labore enim repellat earum perspiciatis.</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
|
|
<div class="heading-block fancy-title border-bottom-0 title-bottom-border">
|
|
<h4>What we <span>Do</span>.</h4>
|
|
</div>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quasi quidem minus id omnis, nam expedita, ea fuga commodi voluptas iusto, hic autem deleniti dolores explicabo labore enim repellat earum perspiciatis.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</section><!-- #content end -->
|
|
<!--Modal for More Product-->
|
|
<div class="modal fade more_product_modal" id="menu6">
|
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">More Products</h4>
|
|
<button type="button" class="close" data-bs-dismiss="modal">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="img_sec">
|
|
<img src="<?=base_url();?>fassets/images/home/product_icons/3.png" alt="Car">
|
|
</div>
|
|
<p>Motor</p>
|
|
<ul>
|
|
<li>
|
|
<a href="">Car Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Two Wheeler/Bike Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Commercial Vehicle Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Taxi/Cab Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Auto Rickshaw Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Truck Insurance</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col">
|
|
<div class="img_sec">
|
|
<img src="<?=base_url();?>fassets/images/home/product_icons/1.png" alt="health">
|
|
</div>
|
|
<p>Health</p>
|
|
<ul>
|
|
<li>
|
|
<a href="">Health Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Super Top-up Health Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">OPD Health Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Arogya Sanjeevani Policy</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Personal Accident Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Corporate Health Insurance</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col">
|
|
<div class="img_sec">
|
|
<img src="<?=base_url();?>fassets/images/home/product_icons/6.png" alt="documentation">
|
|
</div>
|
|
<p>Other</p>
|
|
<ul>
|
|
<li>
|
|
<a href="">International Travel Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Flight Delay</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Shop Insurance</a>
|
|
</li>
|
|
<li>
|
|
<a href="">Home Insurance</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php include 'includes/footer.php';?>
|
|
|
|
<script type="text/javascript">
|
|
var date = document.getElementById('lifedateofbirth');
|
|
|
|
function checkValue(str, max) {
|
|
if (str.charAt(0) !== '0' || str == '00') {
|
|
var num = parseInt(str);
|
|
if (isNaN(num) || num <= 0 || num > max) num = 1;
|
|
str = num > parseInt(max.toString().charAt(0)) && num.toString().length == 1 ? '0' + num : num.toString();
|
|
};
|
|
return str;
|
|
};
|
|
|
|
date.addEventListener('input', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
if (/\D\/$/.test(input)) input = input.substr(0, input.length - 3);
|
|
var values = input.split('/').map(function(v) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
if (values[0]) values[0] = checkValue(values[0], 12);
|
|
if (values[1]) values[1] = checkValue(values[1], 31);
|
|
var output = values.map(function(v, i) {
|
|
return v.length == 2 && i < 2 ? v + ' / ' : v;
|
|
});
|
|
this.value = output.join('').substr(0, 14);
|
|
});
|
|
|
|
date.addEventListener('blur', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
var values = input.split('/').map(function(v, i) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
var output = '';
|
|
|
|
if (values.length == 3) {
|
|
var year = values[2].length !== 4 ? parseInt(values[2]) + 2000 : parseInt(values[2]);
|
|
var month = parseInt(values[0]) - 1;
|
|
var day = parseInt(values[1]);
|
|
var d = new Date(year, month, day);
|
|
if (!isNaN(d)) {
|
|
document.getElementById('result').innerText = d.toString();
|
|
var dates = [d.getMonth() + 1, d.getDate(), d.getFullYear()];
|
|
output = dates.map(function(v) {
|
|
v = v.toString();
|
|
return v.length == 1 ? '0' + v : v;
|
|
}).join(' / ');
|
|
};
|
|
};
|
|
this.value = output;
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
var date = document.getElementById('Leaving');
|
|
|
|
function checkValue(str, max) {
|
|
if (str.charAt(0) !== '0' || str == '00') {
|
|
var num = parseInt(str);
|
|
if (isNaN(num) || num <= 0 || num > max) num = 1;
|
|
str = num > parseInt(max.toString().charAt(0)) && num.toString().length == 1 ? '0' + num : num.toString();
|
|
};
|
|
return str;
|
|
};
|
|
|
|
date.addEventListener('input', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
if (/\D\/$/.test(input)) input = input.substr(0, input.length - 3);
|
|
var values = input.split('/').map(function(v) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
if (values[0]) values[0] = checkValue(values[0], 12);
|
|
if (values[1]) values[1] = checkValue(values[1], 31);
|
|
var output = values.map(function(v, i) {
|
|
return v.length == 2 && i < 2 ? v + ' / ' : v;
|
|
});
|
|
this.value = output.join('').substr(0, 14);
|
|
});
|
|
|
|
date.addEventListener('blur', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
var values = input.split('/').map(function(v, i) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
var output = '';
|
|
|
|
if (values.length == 3) {
|
|
var year = values[2].length !== 4 ? parseInt(values[2]) + 2000 : parseInt(values[2]);
|
|
var month = parseInt(values[0]) - 1;
|
|
var day = parseInt(values[1]);
|
|
var d = new Date(year, month, day);
|
|
if (!isNaN(d)) {
|
|
document.getElementById('result').innerText = d.toString();
|
|
var dates = [d.getMonth() + 1, d.getDate(), d.getFullYear()];
|
|
output = dates.map(function(v) {
|
|
v = v.toString();
|
|
return v.length == 1 ? '0' + v : v;
|
|
}).join(' / ');
|
|
};
|
|
};
|
|
this.value = output;
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
var date = document.getElementById('Return');
|
|
|
|
function checkValue(str, max) {
|
|
if (str.charAt(0) !== '0' || str == '00') {
|
|
var num = parseInt(str);
|
|
if (isNaN(num) || num <= 0 || num > max) num = 1;
|
|
str = num > parseInt(max.toString().charAt(0)) && num.toString().length == 1 ? '0' + num : num.toString();
|
|
};
|
|
return str;
|
|
};
|
|
|
|
date.addEventListener('input', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
if (/\D\/$/.test(input)) input = input.substr(0, input.length - 3);
|
|
var values = input.split('/').map(function(v) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
if (values[0]) values[0] = checkValue(values[0], 12);
|
|
if (values[1]) values[1] = checkValue(values[1], 31);
|
|
var output = values.map(function(v, i) {
|
|
return v.length == 2 && i < 2 ? v + ' / ' : v;
|
|
});
|
|
this.value = output.join('').substr(0, 14);
|
|
});
|
|
|
|
date.addEventListener('blur', function(e) {
|
|
this.type = 'text';
|
|
var input = this.value;
|
|
var values = input.split('/').map(function(v, i) {
|
|
return v.replace(/\D/g, '')
|
|
});
|
|
var output = '';
|
|
|
|
if (values.length == 3) {
|
|
var year = values[2].length !== 4 ? parseInt(values[2]) + 2000 : parseInt(values[2]);
|
|
var month = parseInt(values[0]) - 1;
|
|
var day = parseInt(values[1]);
|
|
var d = new Date(year, month, day);
|
|
if (!isNaN(d)) {
|
|
document.getElementById('result').innerText = d.toString();
|
|
var dates = [d.getMonth() + 1, d.getDate(), d.getFullYear()];
|
|
output = dates.map(function(v) {
|
|
v = v.toString();
|
|
return v.length == 1 ? '0' + v : v;
|
|
}).join(' / ');
|
|
};
|
|
};
|
|
this.value = output;
|
|
});
|
|
</script>
|
|
<script>
|
|
$("#lifedateofbirth").mouseout(function(){
|
|
var today = new Date();
|
|
var dobs= $("#lifedateofbirth").val();
|
|
|
|
|
|
|
|
var dob = new Date(dobs);
|
|
|
|
//calculate month difference from current date in time
|
|
var month_diff = Date.now() - dob.getTime();
|
|
|
|
//convert the calculated difference in date format
|
|
var age_dt = new Date(month_diff);
|
|
|
|
//extract year from date
|
|
var year = age_dt.getUTCFullYear();
|
|
|
|
//now calculate the age of the user
|
|
var age = Math.abs(year - 1970);
|
|
if(dobs!=""){ $("#lifeage").html(age+' Years'); $("#life_age").val(age); }else{
|
|
$("#lifeage").html("");
|
|
|
|
}
|
|
|
|
});
|
|
</script>
|
|
<script>
|
|
$('.healthgen').on('click',function(){
|
|
var gen=$(this).val();
|
|
$("#healthradio").val(gen);
|
|
});
|
|
</script>
|
|
<script>
|
|
$( document ).ready(function() {
|
|
var idd=$("a.active").attr("data-id");
|
|
get_current_policy(idd);
|
|
});
|
|
$('.nav-link').on('click',function(){
|
|
var idd=$(this).attr("data-id");
|
|
get_current_policy(idd);
|
|
});
|
|
function get_current_policy(idd)
|
|
{
|
|
var url22=base_path+"frontend/get_current_policy_detail";
|
|
$.post(url22,{idd:idd,csrf_test_name:$.cookie('csrf_cookie_name')},function(result){
|
|
$('.clicked_tab_policy').html(result);
|
|
|
|
});
|
|
}
|
|
</script>
|
|
|
|
|