policybot/application/views/front/agent-document-collect.php
2021-11-30 16:26:55 +05:30

168 lines
5.6 KiB
PHP

<?php $this->load->view('front/includes/header'); ?>
<link rel="stylesheet" href="<?=base_url();?>fassets/css/magnific-popup.css" type="text/css" />
<?php $primaryid=$this->session->userdata('primaryid');
$userrole=$this->session->userdata('userrole');
$loggedname=$this->session->userdata('loggedname');
$tables="users";
$wheres=array("id"=>$primaryid);
$shows=("*");
$userdet=$this->commonsql_model->selectTable($tables,$wheres,$shows);
if($userdet->num_rows()>0)
{
$u=$userdet->row();
$loggedusername=$u->name;
}
$CI=&get_instance();
$CI->load->model("frontend_model");
?>
<style>
.fbox-center .fbox-icon {
margin-bottom: 1rem!important;
}
.fbox-bg.fbox-center {
padding: 0 1rem 1rem !important;
}
.form-error{ text-align:end!important; }
.hide{display:none;}
</style>
<section id="page-title" style="background-image: url('<?=base_url();?>fassets/images/about/333.jpg');">
<div class="container clearfix">
<h1 style="text-align:center"> Agent Profile</h1>
<span style="text-align:center;font-weight:500">Hi <?=ucwords($loggedusername);?> , Welcome to policybot</span>
</div>
</section>
<section id="content">
<div class="content-wrap ">
<div class="container clearfix">
<div class="row" >
<div class="col-md-4 col-lg-3">
<?php $this->load->view('front/includes/leftmenu'); ?>
</div>
<?php
if($quote_user->num_rows()>0)
{
$p=$quote_user->row();
$username=$p->username;
$user_id=$p->user_id;
$policy_id=$p->policy_id;
$agency_id=$p->agency_id;
}
?>
<div class="col-md-8 col-lg-9">
<h3>Document Collection of <span style="font-weight:900;color:#f0892c"><?=ucwords($username);?></span></h3>
<?=form_open_multipart(base_url().'agent-collect-documents/'.$prev_qid.'/'.$cat_qid);?>
<div >
<input type="hidden" name="user_id" id="user_id" value="<?=$user_id;?>">
<input type="hidden" name="policy_id" id="policy_id" value="<?=$policy_id;?>">
<input type="hidden" name="agency_id" id="agency_id" value="<?=$agency_id;?>">
<div class="form-group col-md-12">
<div class="form-group " >
<div class="row">
<div class="col-md-5">
<select name="documentss[]" id="document_0" placeholder="Documents" autocomplete="off" class="form-control" data-validation="required" >
<option value=" " > Select</option>
<?php if(isset($doc_coll)&& $doc_coll->num_rows()>0)
{ foreach($doc_coll->result() as $ca)
{ $did=$ca->id;
$doc_name=$ca->doc_name;?>
<option value="<?=$did;?>" ><?=$doc_name;?></option>
<?php } }?>
<select>
</div>
<div class="col-md-5">
<input type="file" name="file[]" id="file_0" placeholder="File" 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>
</div>
<!--new row-->
<div class="form-group form-group1 hide" id="bookTemplate" >
<div class="row">
<div class="col-md-5">
<select type="text" name="documentss[]" id="document" placeholder="Documents" autocomplete="off" class="form-control" data-validation="required" >
<option value=" " > Select</option>
<?php if(isset($doc_coll)&& $doc_coll->num_rows()>0)
{ foreach($doc_coll->result() as $ca)
{ $did=$ca->id;
$doc_name=$ca->doc_name;?>
<option value="<?=$did;?>" ><?=$doc_name;?></option>
<?php } }?>
</select>
</div>
<div class="col-md-5">
<input type="file" name="file[]" id="file" placeholder="File" 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>
<input type="submit" name="doc_submit" class="btn btn-primary" value="Submit">
</div>
<?=form_close();?>
</div>
</div>
</div>
</div>
</section>
<?php $this->load->view('front/includes/footer'); ?>
<script src="<?=base_url();?>bassets/jquery.min.js"></script>
<script src="<?=base_url();?>bassets/popper/popper.js"></script>
<script src="<?=base_url();?>bassets/jquery.blockui.min.js"></script>
<script src="<?=base_url();?>bassets/jquery.slimscroll.js"></script>
<script>
sevIndexx = 0;
$('body').on('click', '.addButton', function() {
sevIndexx++;
var $template = $('#bookTemplate'),
$clone = $template
.clone(true)
.removeClass('hide')
.removeAttr('id')
.attr('data-book-index2', sevIndexx)
.insertBefore($template);
// Update the name attributes sev_account
// Update the name attributes sev_account
$clone
.find('[id="document"]').attr('id', 'document_' + sevIndexx ).end()
.find('[id="file"]').attr('id', 'file_' + sevIndexx ).end()
})
// Remove button click handler
.on('click', '.removeButton', function() {
var $row = $(this).parents('.form-group1'),
index = $row.attr('data-book-index2');
$row.remove();
});
</script>