394 lines
17 KiB
PHP
394 lines
17 KiB
PHP
|
<link href="<?=base_url();?>bassets/select2/css/select2.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="<?=base_url();?>bassets/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||
|
|
||
|
<?php $this->load->view('admin/includes/header');?>
|
||
|
<div class="page-container">
|
||
|
<?php $this->load->view('admin/includes/sidebar');?>
|
||
|
<!-- start page content -->
|
||
|
<div class="page-content-wrapper">
|
||
|
<div class="page-content">
|
||
|
<div class="page-bar">
|
||
|
<div class="page-title-breadcrumb">
|
||
|
<div class=" pull-left">
|
||
|
<div class="page-title">Policy Add</div>
|
||
|
</div>
|
||
|
<ol class="breadcrumb page-breadcrumb pull-right">
|
||
|
<li><i class="fa fa-home"></i> <a class="parent-item" href="index.html">Home</a> <i class="fa fa-angle-right"></i>
|
||
|
</li>
|
||
|
<li><a class="parent-item" href="<?=base_url();?>admin/policies">Policy</a> <i class="fa fa-angle-right"></i>
|
||
|
</li>
|
||
|
<li class="active">Policy Add</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php $this->load->view('admin/includes/msg');?>
|
||
|
<div class="row">
|
||
|
<div class="col-md-12">
|
||
|
<div class="card card-topline-orange">
|
||
|
<div class="white-box">
|
||
|
<div class="card card-box">
|
||
|
<div class="card-head">
|
||
|
<header>Add Policy</header>
|
||
|
|
||
|
</div>
|
||
|
<div class="card-body ">
|
||
|
<?=form_open_multipart(base_url().'admin/add-policy');?>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Policy Name <span class="required">*</span></label>
|
||
|
<input type="text" name="policyname" autocomplete="off" class="form-control" data-validation="required" placeholder="Policy Name">
|
||
|
</div>
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Company <span class="required">*</span></label>
|
||
|
<select type="text" name="Company" autocomplete="off" class="select2 form-control" data-validation="required" placeholder="Subtitle">
|
||
|
|
||
|
<?php if(isset($cmp)&& $cmp->num_rows()>0)
|
||
|
{ foreach($cmp->result() as $c)
|
||
|
{ $cmid=$c->id;
|
||
|
$cmname=$c->name;?>
|
||
|
<option value="<?=$cmid;?>" ><?=$cmname;?></option>
|
||
|
<?php } }?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Category <span class="required">*</span></label>
|
||
|
<select type="text" name="Category" autocomplete="off" id="category" class="select2 form-control" data-validation="required" placeholder="Subtitle">
|
||
|
<option value=" " > Select</option>
|
||
|
<?php if(isset($cat)&& $cat->num_rows()>0)
|
||
|
{ foreach($cat->result() as $ca)
|
||
|
{ $cid=$ca->id;
|
||
|
$cname=$ca->name;?>
|
||
|
<option value="<?=$cid;?>" ><?=$cname;?></option>
|
||
|
<?php } }?>
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Policy Amount </label>
|
||
|
<div class="row">
|
||
|
<div class="col-md-7">
|
||
|
<input type="text" name="p_amount" id="PolicyAmount" placeholder="Policy Amount" autocomplete="off" class="form-control" >
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<select type="text" name="pa_period" autocomplete="off" class="select2 form-control" placeholder="Subtitle">
|
||
|
|
||
|
<option value="Years" >Year</option>
|
||
|
<option value="Months" >Months</option>
|
||
|
<option value="Days" >Days</option>
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Policy Period <span class="required">*</span></label>
|
||
|
<div class="row">
|
||
|
<div class="col-md-7">
|
||
|
<input type="text" name="p_period" id="PolicyPeriod" placeholder="Policy Period" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<select type="text" name="pp_period" autocomplete="off" class="select2 form-control" data-validation="required" placeholder="Subtitle">
|
||
|
|
||
|
<option value="Years" >Year</option>
|
||
|
<option value="Months" >Months</option>
|
||
|
<option value="Days" >Days</option>
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Guarantee <span class="required">*</span></label>
|
||
|
<div class="row">
|
||
|
<div class="col-md-7">
|
||
|
<input type="text" name="guarantee" id="guarantee" placeholder="Guarantee" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<select type="text" name="g_period" autocomplete="off" class="select2 form-control" data-validation="required" placeholder="Subtitle">
|
||
|
|
||
|
<option value="Years" >Year</option>
|
||
|
<option value="Months" >Months</option>
|
||
|
<option value="Days" >Days</option>
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Image <span class="required">*</span> </label>
|
||
|
<input type="file" name="Image" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="form-group col-md-6">
|
||
|
<label for="simpleFormEmail"> Intro <span class="required">*</span></label>
|
||
|
<textarea name="Intro" autocomplete="off" class="form-control" data-validation="required" placeholder="Introduction"></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-4">
|
||
|
<div class="row">
|
||
|
<div class="col-md-7">
|
||
|
<label for="simpleFormEmail"> Life Cover Amount <span class="required">*</span></label>
|
||
|
|
||
|
<input type="text" name="lifecover" autocomplete="off" class="form-control" data-validation="number" data-validation-allowing="float" placeholder="EX : 1 ">
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<label for="simpleFormEmail"> Amount type <span class="required">*</span></label>
|
||
|
|
||
|
<select type="text" name="am_type" autocomplete="off" class="select2 form-control" data-validation="required" placeholder="Subtitle">
|
||
|
|
||
|
<option value="LAC" >LAC</option>
|
||
|
<option value="CR" >CR</option>
|
||
|
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group col-md-2">
|
||
|
<label for="simpleFormEmail">Is Top Plan <span class="required">*</span></label>
|
||
|
<input type="checkbox" id="topplan" name="topplan" value="0" autocomplete="off" class="form-control" >
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group col-md-3">
|
||
|
<label for="simpleFormEmail"> Claim Settlement ( % ) <span class="required">*</span></label>
|
||
|
<input type="text" name="claimsettleper" autocomplete="off" class="form-control" data-validation="number" data-validation-allowing="float" placeholder="EX : 98">
|
||
|
</div>
|
||
|
<div class="form-group col-md-3">
|
||
|
<label for="simpleFormEmail"> Max Age Limit (Years)<span class="required">*</span></label>
|
||
|
<input type="text" name="maxager" autocomplete="off" class="form-control" data-validation="number length" data-validation-length="2" placeholder="EX : 75">
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-6">
|
||
|
<div class="">
|
||
|
<label for="simpleFormEmail"> Benefits <span class="required">*</span> </label>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-md-10">
|
||
|
<input type="text" name="benefits[]" id="benefits_0" placeholder="Benefits" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-2">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-primary addButton" ><i class="fa fa-plus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--new row-->
|
||
|
<div class="form-group form-group1 hide" id="bookTemplate">
|
||
|
<div class="row">
|
||
|
<div class="col-md-10">
|
||
|
<input type="text" name="benefits[]" id="benefits" placeholder="Benefits" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-2">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-danger removeButton" ><i class="fa fa-minus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group col-md-6">
|
||
|
<div class="">
|
||
|
<label for="simpleFormEmail"> Specialization <span class="required">*</span></label>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-md-10">
|
||
|
<input type="text" name="Specialization[]" id="Specialization_0" placeholder="Specialization" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-2">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-primary addButton1" ><i class="fa fa-plus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--new row-->
|
||
|
<div class="form-group form-group1 hide" id="bookTemplate1">
|
||
|
<div class="row">
|
||
|
<div class="col-md-10">
|
||
|
<input type="text" name="Specialization[]" id="Specialization" placeholder="Specialization" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-2">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-danger removeButton1" ><i class="fa fa-minus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="form-group col-md-12">
|
||
|
<div class="">
|
||
|
<label for="simpleFormEmail"> Compare Details <span class="required">*</span> </label>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-md-6">
|
||
|
<select type="text" name="Compare[]" id="Compare_0" class="form-control Compare " data-validation="required" >
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<input type="text" name="cmp_detail[]" id="cmp_detail_0" placeholder="Compare Details" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-1">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-primary addButton2" ><i class="fa fa-plus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--new row-->
|
||
|
<div class="form-group form-group1 hide" id="bookTemplate2">
|
||
|
<div class="row">
|
||
|
<div class="col-md-6">
|
||
|
<select type="text" name="Compare[]" id="Compare" class="form-control Compare " data-validation="required" >
|
||
|
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="col-md-5">
|
||
|
<input type="text" name="cmp_detail[]" id="cmp_detail" placeholder="Compare Details" autocomplete="off" class="form-control" data-validation="required" >
|
||
|
</div>
|
||
|
<div class="col-md-1">
|
||
|
<button type="button" style="margin-top:0px" class="btn btn-danger removeButton2" ><i class="fa fa-minus"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<input type="submit" name="add" class="btn btn-primary" value="Submit">
|
||
|
<?=form_close();?>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--modal -->
|
||
|
<div class="modal fade" id="rolepop" tabindex="-1" role="basic" aria-hidden="true">
|
||
|
<div class="modal-dialog">
|
||
|
<div class="modal-content">
|
||
|
<div class="viewdetails">
|
||
|
<img src="<?=base_url();?>bassets/admin/img/process.gif" class="loader-img">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php $this->load->view('admin/includes/footer');?>
|
||
|
<script type="text/javascript" src="<?=base_url();?>bassets/admin/js/jquery.cookie.min.js"></script>
|
||
|
<script src="<?=base_url();?>bassets/select2/js/select2.js"></script>
|
||
|
<script src="<?=base_url();?>bassets/select2/js/select2-init.js"></script>
|
||
|
<script>
|
||
|
sevIndex = 0;
|
||
|
sevIndex++;
|
||
|
$('body').on('click', '.addButton', function() {
|
||
|
|
||
|
var $template = $('#bookTemplate'),
|
||
|
$clone = $template
|
||
|
.clone(true)
|
||
|
.removeClass('hide')
|
||
|
.removeAttr('id')
|
||
|
.attr('data-book-index1', sevIndex)
|
||
|
.insertBefore($template);
|
||
|
|
||
|
// Update the name attributes sev_account
|
||
|
// Update the name attributes sev_account
|
||
|
$clone
|
||
|
.find('[id="benefits"]').attr('id', 'benefits_' + sevIndex ).end()
|
||
|
|
||
|
|
||
|
})
|
||
|
// Remove button click handler
|
||
|
.on('click', '.removeButton', function() {
|
||
|
var $row = $(this).parents('.form-group1'),
|
||
|
index = $row.attr('data-book-index1');
|
||
|
$row.remove();
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
<script>
|
||
|
sevIndexx = 0;
|
||
|
sevIndexx++;
|
||
|
$('body').on('click', '.addButton1', function() {
|
||
|
|
||
|
var $template = $('#bookTemplate1'),
|
||
|
$clone = $template
|
||
|
.clone(true)
|
||
|
.removeClass('hide')
|
||
|
.removeAttr('id')
|
||
|
.attr('data-book-index1', sevIndexx)
|
||
|
.insertBefore($template);
|
||
|
|
||
|
// Update the name attributes sev_account
|
||
|
// Update the name attributes sev_account
|
||
|
$clone
|
||
|
.find('[id="Specialization"]').attr('id', 'Specialization_' + sevIndexx ).end()
|
||
|
|
||
|
|
||
|
})
|
||
|
// Remove button click handler
|
||
|
.on('click', '.removeButton1', function() {
|
||
|
var $row = $(this).parents('.form-group1'),
|
||
|
index = $row.attr('data-book-index1');
|
||
|
$row.remove();
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
<script>
|
||
|
sevIndex = 0;
|
||
|
sevIndex++;
|
||
|
$('body').on('click', '.addButton2', function() {
|
||
|
|
||
|
var $template = $('#bookTemplate2'),
|
||
|
$clone = $template
|
||
|
.clone(true)
|
||
|
.removeClass('hide')
|
||
|
.removeAttr('id')
|
||
|
.attr('data-book-index1', sevIndex)
|
||
|
.insertBefore($template);
|
||
|
|
||
|
// Update the name attributes sev_account
|
||
|
// Update the name attributes sev_account
|
||
|
$clone
|
||
|
.find('[id="Compare"]').attr('id', 'Compare_' + sevIndex ).end()
|
||
|
.find('[id="cmp_detail"]').attr('id', 'cmp_detail_' + sevIndex ).end()
|
||
|
|
||
|
|
||
|
})
|
||
|
// Remove button click handler
|
||
|
.on('click', '.removeButton2', function() {
|
||
|
var $row = $(this).parents('.form-group1'),
|
||
|
index = $row.attr('data-book-index1');
|
||
|
$row.remove();
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
<script>
|
||
|
var base_path=$('body').attr('data-path');
|
||
|
$("#category").on('change',function() {
|
||
|
|
||
|
var val = $(this).val();
|
||
|
var url22=base_path+"policy/get_compare_master";
|
||
|
$.post(url22,{val:val,csrf_test_name:$.cookie('csrf_cookie_name')},function(result){
|
||
|
|
||
|
$('.Compare').html(result);
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
</script>
|
||
|
<script>
|
||
|
$('input[type="checkbox"]').click(function(){
|
||
|
if($(this).prop("checked") == true){
|
||
|
$("#topplan").val("1");
|
||
|
}
|
||
|
else if($(this).prop("checked") == false){
|
||
|
$("#topplan").val("0");
|
||
|
}
|
||
|
});
|
||
|
</script>
|