TEST_AND_FIXING_ALL_MODULES : RV
This commit is contained in:
parent
8159b60810
commit
d0af316efd
BIN
ams_vendor.zip
Normal file
BIN
ams_vendor.zip
Normal file
Binary file not shown.
@ -79,6 +79,10 @@
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'database' => 'test',
|
||||
// 'hostname' => '119.18.54.85',
|
||||
// 'username' => 'venbaehn_ams',
|
||||
// 'password' => 'L;nD7Z@f)1ZT',
|
||||
// 'database' => 'venbaehn_ams',
|
||||
'dbdriver' => 'mysqli',
|
||||
'dbprefix' => '',
|
||||
'pconnect' => FALSE,
|
||||
|
||||
@ -190,10 +190,12 @@ public function verify_otp(){
|
||||
|
||||
|
||||
public function change_password()
|
||||
{
|
||||
{
|
||||
print_r($this->input->post('id')); die;
|
||||
$id = $this->input->post('id');
|
||||
$data['password'] = hash_password($this->input->post('password'));
|
||||
$table="users";
|
||||
$table="users";
|
||||
|
||||
$userData = $this->MY_Model->edit_option($data, $id, $table);
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>AMS </title>
|
||||
<link rel="icon" href="<?php echo base_url(); ?>/assets/appimg/default.ico" />
|
||||
|
||||
<title>BigBamboo Enterprise</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
@ -22,9 +25,9 @@
|
||||
|
||||
<!-- Custom Theme Style -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/build/css/custom.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<style>
|
||||
.field-icon {
|
||||
</head>
|
||||
<style>
|
||||
.field-icon {
|
||||
float: right;
|
||||
margin-left: -25px;
|
||||
margin-top: -45px;
|
||||
@ -32,71 +35,62 @@
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
</style>
|
||||
<body class="login">
|
||||
<div class="login_wrapper">
|
||||
</style>
|
||||
|
||||
<body class="login">
|
||||
<div class="login_wrapper">
|
||||
<div class="animate form login_form">
|
||||
<section class="login_content">
|
||||
<form id="otp-form" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>auth/change_password" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" id="id" name="id" value="<?php echo $id ?>">
|
||||
<h1>Change Password</h1>
|
||||
<div>
|
||||
<input type="password" id="password" name="password" class="form-control" placeholder="Password" required="required" />
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" id="confirm_password" name="confirm_password" class="form-control" placeholder="Confrim Password" required="required" />
|
||||
<p id='message'></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
<section class="login_content">
|
||||
<form id="otp-form" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>auth/change_password" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" id="id" name="id" value="<?php echo $id ?>">
|
||||
<h1>Change Password</h1>
|
||||
<div>
|
||||
<input type="password" id="password" name="password" class="form-control" placeholder="Password"
|
||||
required="required" />
|
||||
<span toggle="#password" id="toggle-password"
|
||||
class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" id="confirm_password" name="confirm_password" class="form-control"
|
||||
placeholder="Confrim Password" required="required" />
|
||||
<p id='message'></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="clearfix"></div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<!-- <div class="separator">
|
||||
<p class="change_link">Already a member ?
|
||||
<a href="<?php echo base_url().'auth/verify_user'?>" class="to_register"> Log in </a>
|
||||
</p>
|
||||
<script>
|
||||
$("#toggle-password").click(function() {
|
||||
$(this).toggleClass("fa-eye fa-eye-slash");
|
||||
var input = $($(this).attr("toggle"));
|
||||
if (input.attr("type") == "password") {
|
||||
input.attr("type", "text");
|
||||
} else {
|
||||
input.attr("type", "password");
|
||||
}
|
||||
});
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
|
||||
<p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 4 template. Privacy and Terms</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$("#toggle-password").click(function() {
|
||||
$(this).toggleClass("fa-eye fa-eye-slash");
|
||||
var input = $($(this).attr("toggle"));
|
||||
if (input.attr("type") == "password") {
|
||||
input.attr("type", "text");
|
||||
}
|
||||
else {
|
||||
input.attr("type", "password");
|
||||
}
|
||||
});
|
||||
|
||||
$('#password, #confirm_password').on('keyup', function () {
|
||||
$(':input[type="submit"]').prop('disabled', true);
|
||||
if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val().length > 0 ) {
|
||||
$('#message').html('Matching').css('color', 'green');
|
||||
$('button[type="submit"]').attr("disabled", false);
|
||||
}
|
||||
else if($('#password').val().length == 0 || $('#confirm_password').val().length == 0){
|
||||
$('#message').html('');
|
||||
}
|
||||
else
|
||||
$('#message').html('Not Matching').css('color', 'red');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
$('#password, #confirm_password').on('keyup', function() {
|
||||
$(':input[type="submit"]').prop('disabled', true);
|
||||
if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val()
|
||||
.length > 0) {
|
||||
$('#message').html('Matching').css('color', 'green');
|
||||
$('button[type="submit"]').attr("disabled", false);
|
||||
} else if ($('#password').val().length == 0 || $('#confirm_password').val().length == 0) {
|
||||
$('#message').html('');
|
||||
} else
|
||||
$('#message').html('Not Matching').css('color', 'red');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,13 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="<?php echo base_url(); ?>/assets/appimg/default.ico" />
|
||||
|
||||
<title>AMS </title>
|
||||
<title>BigBamboo Enterprise</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
@ -20,93 +22,58 @@
|
||||
|
||||
<!-- Custom Theme Style -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/build/css/custom.min.css" rel="stylesheet">
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body class="login">
|
||||
<body class="login">
|
||||
|
||||
<div>
|
||||
<a class="hiddenanchor" id="signup"></a>
|
||||
<a class="hiddenanchor" id="signin"></a>
|
||||
<div>
|
||||
<a class="hiddenanchor" id="signup"></a>
|
||||
<a class="hiddenanchor" id="signin"></a>
|
||||
|
||||
<div class="login_wrapper">
|
||||
<div class="animate form login_form">
|
||||
<section class="login_content">
|
||||
<form method="post" action="<?php echo base_url().'Auth/authendicate'?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<h1>Sign In</h1>
|
||||
<div>
|
||||
<input type="text" class="form-control" value="" name="user_name" placeholder="Username" required="" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" class="form-control" value="" name="password" placeholder="Password" required="" />
|
||||
<p id='message' style="color:red"><?php echo $this->session->flashdata('msg'); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">Log in</button>
|
||||
<a class="reset_pass" href="<?php echo base_url();?>Auth/lost_your_password">Lost your password?</a>
|
||||
</div>
|
||||
<div class="login_wrapper">
|
||||
<div class="animate form login_form">
|
||||
<section class="login_content">
|
||||
<form method="post" action="<?php echo base_url().'Auth/authendicate'?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<h1>Sign In</h1>
|
||||
<div>
|
||||
<input type="text" class="form-control" value="" name="user_name" placeholder="Username"
|
||||
required="" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" class="form-control" value="" name="password" placeholder="Password"
|
||||
required="" />
|
||||
<p id='message' style="color:red"><?php echo $this->session->flashdata('msg'); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">Log in</button>
|
||||
<a class="reset_pass" href="<?php echo base_url();?>Auth/lost_your_password">Lost your
|
||||
password?</a>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="separator">
|
||||
<!-- <p class="change_link">New to site? -->
|
||||
<!-- <a href="<?php echo base_url().'Auth/lost_your_password'?>" class="to_register"> Create Account </a>
|
||||
</p> -->
|
||||
<div class="separator">
|
||||
<!-- <p class="change_link">New to site? -->
|
||||
<!-- <a href="<?php echo base_url().'Auth/lost_your_password'?>" class="to_register"> Create Account </a> </p> -->
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<p><?php echo date('Y'). ' ' . "© ". " ".'BigBamboo Enterprise' ;?></p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <h1>Venba Infotech!</h1> -->
|
||||
<p>All Rights Reserved.Privacy and Terms</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div id="register" class="animate form registration_form">
|
||||
<section class="login_content">
|
||||
<form>
|
||||
<h1>Create Account</h1>
|
||||
<div>
|
||||
<input type="text" class="form-control" placeholder="Username" required="" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="email" class="form-control" placeholder="Email" required="" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" class="form-control" placeholder="Password" required="" />
|
||||
</div>
|
||||
<div>
|
||||
<a class="btn btn-default submit" href="index.html">Submit</a>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="separator">
|
||||
<p class="change_link">Already a member ?
|
||||
<a href="#signin" class="to_register"> Log in </a>
|
||||
</p>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
|
||||
<p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 4 template. Privacy and Terms</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,15 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="<?php echo base_url(); ?>/assets/appimg/default.ico" />
|
||||
|
||||
<title>AMS </title>
|
||||
<title>BigBamboo Enterprise</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
@ -22,153 +24,156 @@
|
||||
|
||||
<!-- Custom Theme Style -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/build/css/custom.min.css" rel="stylesheet">
|
||||
</head>
|
||||
</head>
|
||||
<style>
|
||||
.otp{
|
||||
text-align: right;
|
||||
clear: both;
|
||||
float:right;
|
||||
}
|
||||
.otp {
|
||||
text-align: right;
|
||||
clear: both;
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body class="login">
|
||||
<div class="login_wrapper">
|
||||
<body class="login">
|
||||
<div class="login_wrapper">
|
||||
<div class="animate form login_form">
|
||||
<section class="login_content">
|
||||
<form id="otp-form" data-parsley-validate class="form-horizontal form-label-left" method="post" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" id="hidden_otp" name="hidden_otp" class="form-control" value="" />
|
||||
<input type="hidden" id="id" name="id" value="">
|
||||
<h1>Forgot Password</h1>
|
||||
<!-- <div>
|
||||
<section class="login_content">
|
||||
<form id="otp-form" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" id="hidden_otp" name="hidden_otp" class="form-control" value="" />
|
||||
<input type="hidden" id="id" name="id" value="">
|
||||
<h1>Forgot Password</h1>
|
||||
<!-- <div>
|
||||
<input type="text" class="form-control" placeholder="Username" required="" />
|
||||
</div> -->
|
||||
<div>
|
||||
<a href="#" onclick="send_otp()" class="otp"> Send OTP </a>
|
||||
<div>
|
||||
<input type="email" id="email" name="user_name" class="form-control" placeholder="Email" required="required" />
|
||||
<p id="span_msg"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" id="otp" name="otp" class="form-control" placeholder="OTP" required="required" />
|
||||
<p id="otp_span_msg"></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary">Submit</button>
|
||||
<!-- Button trigger modal -->
|
||||
<!-- <button type="button" class="btn btn-secondary" data-toggle="modal" data-target=".bs-example-modal-sm">
|
||||
<div>
|
||||
<a href="#" onclick="send_otp()" class="otp"> Send OTP </a>
|
||||
<div>
|
||||
<input type="email" id="email" name="user_name" class="form-control" placeholder="Email"
|
||||
required="required" />
|
||||
<p id="span_msg"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" id="otp" name="otp" class="form-control" placeholder="OTP"
|
||||
required="required" />
|
||||
<p id="otp_span_msg"></p>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary">Submit</button>
|
||||
<!-- Button trigger modal -->
|
||||
<!-- <button type="button" class="btn btn-secondary" data-toggle="modal" data-target=".bs-example-modal-sm">
|
||||
Small modal
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="separator">
|
||||
<!-- <p class="change_link">Already a member ?
|
||||
<div class="separator">
|
||||
<!-- <p class="change_link">Already a member ?
|
||||
<a href="<?php echo base_url().'auth/verify_user'?>" class="to_register"> Log in </a>
|
||||
</p> -->
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<!-- <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
|
||||
<div>
|
||||
<!-- <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
|
||||
<p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 4 template. Privacy and Terms</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="body"></div>
|
||||
<div class="body"></div>
|
||||
|
||||
<script>
|
||||
function send_otp(){
|
||||
if ($('#email').val())
|
||||
{
|
||||
$('#span_msg').html('');
|
||||
var data = $("#otp-form").serialize();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>auth/send__mail",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function (response) {
|
||||
// decode encoded json
|
||||
response = jQuery.parseJSON(response)
|
||||
if (response.status == "failed") {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#span_msg').html('invalid username').css('color', 'red');
|
||||
<script>
|
||||
function send_otp() {
|
||||
if ($('#email').val()) {
|
||||
$('#span_msg').html('');
|
||||
var data = $("#otp-form").serialize();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>auth/send__mail",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
// decode encoded json
|
||||
response = jQuery.parseJSON(response)
|
||||
if (response.status == "failed") {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#span_msg').html('invalid username').css('color', 'red');
|
||||
} else {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#hidden_otp').val(response.otp);
|
||||
$('#id').val(response.id);
|
||||
console.log(response.otp);
|
||||
console.log(response.id);
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) {
|
||||
alert('text status ' + textStatus + ', err ' + err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#span_msg').html('Enter Email').css('color', 'red');
|
||||
}
|
||||
else{
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#hidden_otp').val(response.otp);
|
||||
$('#id').val(response.id);
|
||||
console.log(response.otp);
|
||||
console.log(response.id);
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
}
|
||||
|
||||
$('#email').on('keyup', function() {
|
||||
if (!$('#email').val())
|
||||
$('#span_msg').html('');
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#span_msg').html('Enter Email').css('color', 'red');
|
||||
}
|
||||
}
|
||||
|
||||
$('#email').on('keyup', function () {
|
||||
if (!$('#email').val())
|
||||
$('#span_msg').html('');
|
||||
});
|
||||
|
||||
$('#otp').on('keyup', function () {
|
||||
if (!$('#otp').val())
|
||||
$('#otp_span_msg').html('');
|
||||
});
|
||||
|
||||
$(document).on('click','#close-form',function(){
|
||||
$('.bs-example-modal-sm').css('display', 'none');
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.btn-primary',function(){
|
||||
if ($('#otp').val()){
|
||||
var data = $("#otp-form").serialize();
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>auth/verify_otp",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
// decode encoded json
|
||||
response = jQuery.parseJSON(response)
|
||||
if (response.status === "failed") {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#otp_span_msg').html('invalid otp').css('color', 'red');
|
||||
}
|
||||
else {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
console.log(response.id);
|
||||
$('.form').html(response.htmlPage);
|
||||
// location.href = `<?php echo base_url();?>auth/change_password_view/${response.id}`;
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
$('#otp').on('keyup', function() {
|
||||
if (!$('#otp').val())
|
||||
$('#otp_span_msg').html('');
|
||||
});
|
||||
}
|
||||
else{
|
||||
$('#otp_span_msg').html('Pls enter OTP').css('color', 'red');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
$(document).on('click', '#close-form', function() {
|
||||
$('.bs-example-modal-sm').css('display', 'none');
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-primary', function() {
|
||||
if ($('#otp').val()) {
|
||||
var data = $("#otp-form").serialize();
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>auth/verify_otp",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
// decode encoded json
|
||||
response = jQuery.parseJSON(response)
|
||||
if (response.status === "failed") {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#otp_span_msg').html('invalid otp').css('color', 'red');
|
||||
} else {
|
||||
//update the csrf to the form
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
console.log(response.id);
|
||||
$('.form').html(response.htmlPage);
|
||||
// location.href = `<?php echo base_url();?>auth/change_password_view/${response.id}`;
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) {
|
||||
alert('text status ' + textStatus + ', err ' + err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#otp_span_msg').html('Pls enter OTP').css('color', 'red');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -42,8 +42,8 @@ public function index()
|
||||
public function business_list()
|
||||
{
|
||||
|
||||
$business_list = $this->Business_model->get_business_details();
|
||||
$this->layout->set('tableData', $business_list);
|
||||
$business_list = $this->Business_model->get_business_details();
|
||||
$this->layout->set('tableData', $business_list);
|
||||
$this->layout->buffer('main_content', 'Business/business_list');
|
||||
$this->layout->render('default_layout');
|
||||
|
||||
@ -52,7 +52,7 @@ public function business_list()
|
||||
public function add_business()
|
||||
{
|
||||
|
||||
$this->layout->set('stateData', $this->MY_Model->select('state'));
|
||||
$this->layout->set('stateData', $this->MY_Model->select('state'));
|
||||
$this->layout->set('ModuleData', $this->MY_Model->select('modules'));
|
||||
$this->layout->buffer('main_content', 'Business/add_business');
|
||||
$this->layout->render('default_layout');
|
||||
@ -87,14 +87,20 @@ public function create_business()
|
||||
$add_admin = $this->input->post('add_admin');
|
||||
unset($data['add_admin']);
|
||||
}
|
||||
$count = count($this->input->post('module_id'));
|
||||
for($i=0;$i<$count;$i++)
|
||||
{
|
||||
$mdata['module_id'] = $this->input->post('module_id')[$i];
|
||||
$mdata['uid'] = $this->input->post('uid');
|
||||
$mdata['is_active'] = 1;
|
||||
$add_module = $this->MY_Model->insert($mdata, "permit_modules");
|
||||
}
|
||||
|
||||
$modules = $this->input->post('module_id');
|
||||
if($modules !== NULL && $modules !== ''){
|
||||
|
||||
$count = count($modules);
|
||||
|
||||
for($i=0;$i<$count;$i++)
|
||||
{
|
||||
$mdata['module_id'] = $this->input->post('module_id')[$i];
|
||||
$mdata['uid'] = $this->input->post('uid');
|
||||
$mdata['is_active'] = 1;
|
||||
$add_module = $this->MY_Model->insert($mdata, "permit_modules");
|
||||
}
|
||||
}
|
||||
unset($data['module_id']);
|
||||
$create_business = $this->MY_Model->insert($data,$table);
|
||||
|
||||
@ -187,12 +193,7 @@ public function edit_business()
|
||||
$differentValues1 = array_diff($module_id_array , $DbData);
|
||||
$differentValues2 = array_diff($DbData , $module_id_array);
|
||||
$final_array = array_merge($differentValues1, $differentValues2);
|
||||
// echo "<pre>";
|
||||
// print_r($DbData); print_r($this->input->post('module_id')); print_r($final_array);
|
||||
// echo "<pre>";
|
||||
|
||||
// die;
|
||||
|
||||
|
||||
if(count($final_array) != 0)
|
||||
{
|
||||
foreach($final_array as $key => $value){
|
||||
@ -250,7 +251,7 @@ public function delete_business($id)
|
||||
{
|
||||
$Data = $this->Business_model->delete_by_md5_id($id,user()->business_id,'asset');
|
||||
redirect('Business/business_list');
|
||||
}
|
||||
}
|
||||
|
||||
//===================== MODULES =================================================
|
||||
|
||||
@ -305,15 +306,4 @@ public function getDeleteConfirmationPopup()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,18 +1,17 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
<script src="<?php echo base_url(); ?>/assets/default/jquery/dist/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>/assets/jquery.multi-select.js"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.multi-select-container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multi-select-menu {
|
||||
@ -57,7 +56,7 @@
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.multi-select-menuitem + .multi-select-menuitem {
|
||||
.multi-select-menuitem+.multi-select-menuitem {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
@ -73,9 +72,9 @@
|
||||
|
||||
.multi-select-button {
|
||||
display: block;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
max-width: 100%!important;
|
||||
margin-top: 2px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
font-size: 0.875em;
|
||||
padding: 0.85em 0.6em;
|
||||
white-space: nowrap;
|
||||
@ -98,8 +97,8 @@
|
||||
border-color: #999 transparent transparent transparent;
|
||||
margin-left: 0.4em;
|
||||
vertical-align: 0.1em;
|
||||
right:5px;
|
||||
top:17px;
|
||||
right: 5px;
|
||||
top: 17px;
|
||||
}
|
||||
|
||||
.multi-select-container--open .multi-select-menu {
|
||||
@ -120,152 +119,158 @@
|
||||
/* Allow labels to line wrap when menu is artificially narrowed */
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Add Business</h3>
|
||||
<div class="title_left">
|
||||
<h3>Add Business</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Business/create_business" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="uid" value="<?php echo rand(100000,999999); ?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="business_name" name="business_name"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="email" id="email" name="email" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input id="phone" type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" name="phone"
|
||||
class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Modules</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="module_id[]" class="form-control select2_multiple" multiple>
|
||||
<?php foreach ($ModuleData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->modules; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="x_title"> </div> <br />
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="address" name="address" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" class="form-control">
|
||||
<option value=""> Select state </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code</label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="col-md-1 col-sm-1">
|
||||
<input type="checkbox" name="add_admin" class="form-control" value="1">
|
||||
</div>
|
||||
<label class="control-label col-md-5 col-sm-5" for="first-name"> add admin</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/create_business" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="uid" value="<?php echo rand(100000,999999); ?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="business_name" name="business_name" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="email" id="email" name="email" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input id="phone" type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" name="phone" required="required" class="form-control" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Modules<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="module_id[]" class="form-control select2_multiple" multiple>
|
||||
<?php foreach ($ModuleData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->modules; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="x_title"> </div> <br />
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="address" name="address" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" required="required" class="form-control" >
|
||||
<option value=""> Select state </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="col-md-1 col-sm-1">
|
||||
<input type="checkbox" name="add_admin" class="form-control" value="1" >
|
||||
</div>
|
||||
<label class="control-label col-md-5 col-sm-5" for="first-name"> add admin</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
<!-- /Body page content -->
|
||||
@ -1,49 +1,48 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Add Module</h3>
|
||||
</div>
|
||||
<div class="title_left">
|
||||
<h3>Add Module</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/create_add_module" enctype="multipart/form-data">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Business/create_add_module" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Create Module<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="modules" name="modules" class="form-control"required>
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Create Module<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="modules" name="modules" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
|
||||
|
||||
|
||||
<!-- /Body page content -->
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
<script src="<?php echo base_url(); ?>/assets/default/jquery/dist/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>/assets/jquery.multi-select.js"></script>
|
||||
@ -8,7 +7,7 @@
|
||||
.multi-select-container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multi-select-menu {
|
||||
@ -53,7 +52,7 @@
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.multi-select-menuitem + .multi-select-menuitem {
|
||||
.multi-select-menuitem+.multi-select-menuitem {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
@ -69,9 +68,9 @@
|
||||
|
||||
.multi-select-button {
|
||||
display: block;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
max-width: 100%!important;
|
||||
margin-top: 2px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
font-size: 0.875em;
|
||||
padding: 0.85em 0.6em;
|
||||
white-space: nowrap;
|
||||
@ -94,8 +93,8 @@
|
||||
border-color: #999 transparent transparent transparent;
|
||||
margin-left: 0.4em;
|
||||
vertical-align: 0.1em;
|
||||
right:5px;
|
||||
top:17px;
|
||||
right: 5px;
|
||||
top: 17px;
|
||||
}
|
||||
|
||||
.multi-select-container--open .multi-select-menu {
|
||||
@ -116,189 +115,187 @@
|
||||
/* Allow labels to line wrap when menu is artificially narrowed */
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Business</h3>
|
||||
</div>
|
||||
<div class="title_left">
|
||||
<h3>Edit Business</h3>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-sm btn-primary" style="float: right;" href="<?php echo base_url();?>Business/business_list">Business List</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<a class="btn btn-sm btn-primary" style="float: right;"
|
||||
href="<?php echo base_url();?>Business/business_list">Business List</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/edit_business" enctype="multipart/form-data">
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Business/edit_business" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $businessData->id; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $businessData->uid; ?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $businessData->id; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $businessData->uid; ?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input type="text" id="business_name" name="business_name" value="<?php echo $businessData->business_name; ?>" required="required" class="form-control">
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input type="text" id="business_name" name="business_name"
|
||||
value="<?php echo $businessData->business_name; ?>" required="required"
|
||||
class="form-control">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input type="email" id="email" name="email" value="<?php echo $businessData->email; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input type="email" id="email" name="email" value="<?php echo $businessData->email; ?>"
|
||||
required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input id="phone" type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" name="phone" value="<?php echo $businessData->phone; ?>" required="required" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3">
|
||||
<input id="phone" type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" name="phone"
|
||||
value="<?php echo $businessData->phone; ?>" required="required"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Modules</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="module_id[]" class="form-control select2_multiple" multiple>
|
||||
<?php
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Modules<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
$modulesArray = [];
|
||||
|
||||
|
||||
<select id="people" name="module_id[]" class="form-control select2_multiple" multiple >
|
||||
foreach ($businessModuleData as $object) {
|
||||
if (isset($object->modules)) {
|
||||
$modulesArray[] = $object->modules;
|
||||
}
|
||||
|
||||
<?php ?>
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
$modulesArray = [];
|
||||
|
||||
foreach ($businessModuleData as $object) {
|
||||
if (isset($object->modules)) {
|
||||
$modulesArray[] = $object->modules;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ($ModuleData as $key => $data) { ?>
|
||||
<?php if(in_array($data->modules, $modulesArray)) { ?>
|
||||
<option value="<?php echo $data->id; ?>" selected> <?php echo $data->modules; ?> </option>
|
||||
<?php } else { ?>
|
||||
<option value="<?php echo $data->id; ?>"><?php echo $data->modules;?> </option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
foreach ($ModuleData as $key => $data) { ?>
|
||||
<?php if(in_array($data->modules, $modulesArray)) { ?>
|
||||
<option value="<?php echo $data->id; ?>" selected> <?php echo $data->modules; ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="<?php echo $data->id; ?>"><?php echo $data->modules;?> </option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file" value="<?php echo $businessData->logo; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file"
|
||||
value="<?php echo $businessData->logo; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br /> <div class="x_title"> </div> <br />
|
||||
<br />
|
||||
<div class="x_title"> </div> <br />
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="address" name="address" value="<?php echo $businessData->address; ?>" required="required" class="form-control" type="text">
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address</label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="address" name="address" value="<?php echo $businessData->address; ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php echo $businessData->city; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php echo $businessData->city; ?>"
|
||||
required="required" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" required="required" class="form-control" >
|
||||
<option value="<?php echo $businessData->state; ?>"> <?php echo $businessData->state_name; ?> </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" class="form-control">
|
||||
<option value="<?php echo $businessData->state; ?>">
|
||||
<?php echo $businessData->state_name; ?> </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" value="<?php echo $businessData->country; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" value="<?php echo $businessData->country; ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" value="<?php echo $businessData->pincode; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code</label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" value="<?php echo $businessData->pincode; ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-primary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-primary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
|
||||
// $(document).ready(function() {
|
||||
// $("#people").on("click", function() {
|
||||
// // Get the selected values as an array
|
||||
// var selectedValues = $("#people").val();
|
||||
// $(document).ready(function() {
|
||||
// $("#people").on("click", function() {
|
||||
// // Get the selected values as an array
|
||||
// var selectedValues = $("#people").val();
|
||||
|
||||
// // Do something with the selected values (e.g., display them)
|
||||
// if (selectedValues) {
|
||||
// var selectedValuesString = selectedValues.join(", ");
|
||||
// alert("Selected Values: " + selectedValuesString);
|
||||
// } else {
|
||||
// alert("No values selected.");
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// // Do something with the selected values (e.g., display them)
|
||||
// if (selectedValues) {
|
||||
// var selectedValuesString = selectedValues.join(", ");
|
||||
// alert("Selected Values: " + selectedValuesString);
|
||||
// } else {
|
||||
// alert("No values selected.");
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
var selected = [];
|
||||
for (var option of document.getElementById('people').options)
|
||||
{
|
||||
if (option.selected) {
|
||||
selected.push(option.value);
|
||||
var selected = [];
|
||||
for (var option of document.getElementById('people').options) {
|
||||
if (option.selected) {
|
||||
selected.push(option.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
@ -1,53 +1,53 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Module</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Business/edit_module_data" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<input type="hidden" name="id" value="<?php echo $module_data->id;?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Module Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="modules" name="modules" class="form-control" required
|
||||
value="<?php echo $module_data->modules ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Module</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/edit_module_data" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<input type="hidden" name="id" value="<?php echo $module_data->id;?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Module Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="modules" name="modules" class="form-control"required value="<?php echo $module_data->modules ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-5 col-sm-5 offset-md-1">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
|
||||
|
||||
|
||||
<!-- /Body page content -->
|
||||
@ -70,52 +70,7 @@ public function addEmployee($businessId = 0)
|
||||
|
||||
}
|
||||
|
||||
public function add_employee_education()
|
||||
{
|
||||
|
||||
$id = $this->input->post('id');
|
||||
if ($id) {
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_qualification";
|
||||
$create_user = $this->MY_Model->update_md5($data,md5($id),$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
else{
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_qualification";
|
||||
$create_user = $this->MY_Model->insert($data,$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function add_employee_history()
|
||||
{
|
||||
$id = $this->input->post('id');
|
||||
if ($id) {
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_history";
|
||||
$create_user = $this->MY_Model->update_md5($data,md5($id),$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
else{
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_history";
|
||||
$create_user = $this->MY_Model->insert($data,$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function createEmp()
|
||||
{
|
||||
//insert in users table
|
||||
@ -532,5 +487,52 @@ public function editEmp_history($id)
|
||||
}
|
||||
|
||||
|
||||
public function add_employee_education()
|
||||
{
|
||||
|
||||
$id = $this->input->post('id');
|
||||
if ($id) {
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_qualification";
|
||||
$create_user = $this->MY_Model->update_md5($data,md5($id),$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
else{
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_qualification";
|
||||
$create_user = $this->MY_Model->insert($data,$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function add_employee_history()
|
||||
{
|
||||
$id = $this->input->post('id');
|
||||
if ($id) {
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_history";
|
||||
$create_user = $this->MY_Model->update_md5($data,md5($id),$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
else{
|
||||
$data = $this->input->post();
|
||||
// $id = $this->input->post('id');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$table="employee_history";
|
||||
$create_user = $this->MY_Model->insert($data,$table);
|
||||
redirect('Employee/editEmployee/'.md5($this->input->post('emp_id')));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,26 +1,25 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>/assets/jquery.multi-select.js"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.multi-select-container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multi-select-menu {
|
||||
@ -65,7 +64,7 @@
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.multi-select-menuitem + .multi-select-menuitem {
|
||||
.multi-select-menuitem+.multi-select-menuitem {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
@ -81,9 +80,9 @@
|
||||
|
||||
.multi-select-button {
|
||||
display: block;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
max-width: 100%!important;
|
||||
margin-top: 2px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
font-size: 0.875em;
|
||||
padding: 0.85em 0.6em;
|
||||
white-space: nowrap;
|
||||
@ -106,8 +105,8 @@
|
||||
border-color: #999 transparent transparent transparent;
|
||||
margin-left: 0.4em;
|
||||
vertical-align: 0.1em;
|
||||
right:5px;
|
||||
top:17px;
|
||||
right: 5px;
|
||||
top: 17px;
|
||||
}
|
||||
|
||||
.multi-select-container--open .multi-select-menu {
|
||||
@ -128,19 +127,20 @@
|
||||
/* Allow labels to line wrap when menu is artificially narrowed */
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="title_left"><h3>Add Employee</h3></div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="page-title">
|
||||
<div class="title_left">
|
||||
<h3>Add Employee</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
|
||||
<!-- <div class="x_title">
|
||||
<!-- <div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i id="chevron" class="fa fa-chevron-up"></i></a></li>
|
||||
@ -149,377 +149,424 @@
|
||||
<h6>Add Employee Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div> -->
|
||||
<!-- <div class="x_content"> -->
|
||||
<br />
|
||||
<form id="form" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Employee/createEmp" enctype="multipart/form-data">
|
||||
<!-- <div class="x_content"> -->
|
||||
<br />
|
||||
<form id="form" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Employee/createEmp" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Personal Information<a style="color:red;">*</a>
|
||||
</div><br />
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Personal Information<a style="color:red;">*</a>
|
||||
</div><br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name"
|
||||
value="<?php if(isset($editData)) { echo $editData->name; } ?>" required="required"
|
||||
onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Email<a style="color:red;">*</a>
|
||||
</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="email" name="email"
|
||||
value="<?php if(isset($editData)){ echo $editData->email; } ?>" required="required"
|
||||
class="form-control" type="email"
|
||||
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
|
||||
oninvalid="setCustomValidity('Enter a Valid E-mail Address.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Mobile<a style="color:red;">*</a>
|
||||
</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="mobile" name="mobile"
|
||||
value="<?php if(isset($editData)) { echo $editData->mobile; } ?>"
|
||||
onkeypress="return matchnum(event)" required="required" class="form-control" type="text"
|
||||
pattern="[6-9][0-9]{9}" minlength="10" maxlength="10"
|
||||
oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Department</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="department" name="department" required="required" class="form-control">
|
||||
<option value="">--Select--</option>
|
||||
<!-- <option value="<?php if(isset($editData)) { echo $editData->department; } ?>"> -->
|
||||
<?php if(isset($assetData)) { echo $editData->department; } ?></option>
|
||||
<?php foreach ($departmentData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email">Join date</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="j_date" name="j_date"
|
||||
value="<?php if(isset($editData)) { echo $editData->email; } ?>" class="form-control"
|
||||
type="text" placeholder="DD-MM-YYYY" onkeypress="validateKeyPress(event)"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Manager</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="manager" name="manager" class="form-control">
|
||||
<option value="">--Select--</option>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id;?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Marital Status</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="marital_status" name="marital_status" class="form-control">
|
||||
<option value="">--Select--</option>
|
||||
<option value="single">Single</option>
|
||||
<option value="married">Married</option>
|
||||
<option value="others">Others</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="user_name" name="user_name" value="" required="required"
|
||||
class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value=""
|
||||
required="required" class="form-control "
|
||||
title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password"
|
||||
class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value=""
|
||||
required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Emergency Contact </h5>
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_name" name="relation_name"
|
||||
value="<?php if(isset($editData)) { echo $editData->name; } ?>"
|
||||
onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Relationship</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relationship" name="relationship"
|
||||
value="<?php if(isset($editData)) { echo $editData->email; } ?>"
|
||||
class="form-control" onkeypress="validateKeyPress(event)" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_mobile" name="relation_mobile"
|
||||
onkeypress="return matchnum(event)"
|
||||
value="<?php if(isset($editData)) { echo $editData->name; } ?>"
|
||||
class="form-control " pattern="[6-9][0-9]{9}" minlength="10" maxlength="10"
|
||||
oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Home Tel</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relation_tel" name="relation_tel" onkeypress="return matchnum(event)"
|
||||
value="<?php if(isset($editData)) { echo $editData->relation_tel; } ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Address Details</h5>
|
||||
</div><br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Address</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="address" name="address"
|
||||
value="<?php if(isset($editData)) { echo $editData->address; } ?>"
|
||||
class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php if(isset($editData)) { echo $editData->city; } ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="state" name="state"
|
||||
value="<?php if(isset($editData)) { echo $editData->state; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Pincode</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="pincode" name="pincode" onkeypress="return matchnum(event)"
|
||||
value="<?php if(isset($editData)) { echo $editData->pincode; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------------------------------------------------->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Additional Information</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Employee Id</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="employee_id" name="emp_id"
|
||||
value="<?php if(isset($editData)) { echo $editData->name; } ?>" class="form-control">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Salary</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="salary" name="salary"
|
||||
value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Comment</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="comment" name="comment"
|
||||
value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Gender</label>
|
||||
<div class="col-md-5 col-sm-5 " style="padding:10px;">
|
||||
<input type="radio" name="gender" value="male" />Male
|
||||
<input type="radio" name="gender" value="female" />Female
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Photo Upload</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="file" id="image" name="image"
|
||||
value="<?php if(isset($editData)) { echo $editData->profile_pic; } ?>"
|
||||
class="form-control typeFile" onchange="validateFile(this)"
|
||||
accept="image/png, image/jpeg, image/jpg, application/pdf">
|
||||
<img class="profilepic__image" style="width: 50%; display: block;padding:10px;" src="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Permission</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Modules List</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="group_id[]" class="form-control select2_multiple" multiple>
|
||||
<?php foreach ($get_group_list as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->group_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_panel"><br>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<a href="<?php echo base_url();?>Employee/empList" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="<?php if(isset($editData)) { echo $editData->name; } ?>" required="required" onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="email" name="email" value="<?php if(isset($editData)){ echo $editData->email; } ?>" required="required" class="form-control"type="email"
|
||||
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" oninvalid="setCustomValidity('Enter a Valid E-mail Address.')" oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Mobile<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="mobile" name="mobile" value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" onkeypress = "return matchnum(event)"required="required" class="form-control" type="text" pattern="[6-9][0-9]{9}" minlength="10" maxlength="10" oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')" oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Department<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="department" name="department" required="required" class="form-control" >
|
||||
<option value="">--Select--</option>
|
||||
<option value="<?php if(isset($editData)) { echo $editData->department; } ?>"><?php if(isset($assetData)) { echo $editData->department; } ?></option>
|
||||
<?php foreach ($departmentData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email">Join date<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="j_date" name="j_date" value="<?php if(isset($editData)) { echo $editData->email; } ?>" class="form-control" type="text" required placeholder="DD-MM-YYYY" onkeypress="validateKeyPress(event)" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Manager</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="manager" name="manager" class="form-control">
|
||||
<option value="">--Select--</option>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id;?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Marital Status<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="marital_status" name="marital_status" required="required" class="form-control" >
|
||||
<option value="">--Select--</option>
|
||||
<option value="single">Single</option>
|
||||
<option value="married">Married</option>
|
||||
<option value="others">Others</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="user_name" name="user_name" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value="" required="required" class="form-control " title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value="" required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Emergency Contact </h5>
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_name" name="relation_name" value="<?php if(isset($editData)) { echo $editData->name; } ?>" onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Relationship</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relationship" name="relationship" value="<?php if(isset($editData)) { echo $editData->email; } ?>" class="form-control" onkeypress="validateKeyPress(event)" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_mobile" name="relation_mobile" onkeypress = "return matchnum(event)" value="<?php if(isset($editData)) { echo $editData->name; } ?>" class="form-control " pattern="[6-9][0-9]{9}" minlength="10" maxlength="10" oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')" oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Home Tel</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relation_tel" name="relation_tel" onkeypress = "return matchnum(event)" value="<?php if(isset($editData)) { echo $editData->relation_tel; } ?>" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Address Details</h5>
|
||||
</div><br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Address</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="address" name="address" value="<?php if(isset($editData)) { echo $editData->address; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php if(isset($editData)) { echo $editData->city; } ?>" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="state" name="state" value="<?php if(isset($editData)) { echo $editData->state; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Pincode</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="pincode" name="pincode" onkeypress = "return matchnum(event)" value="<?php if(isset($editData)) { echo $editData->pincode; } ?>" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------------------------------------------------->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Additional Information</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br/>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Employee Id</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="employee_id" name="emp_id" value="<?php if(isset($editData)) { echo $editData->name; } ?>" class="form-control">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Salary</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="salary" name="salary" value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Comment</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="comment" name="comment" value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Gender</label>
|
||||
<div class="col-md-5 col-sm-5 " style="padding:10px;">
|
||||
<input type="radio" name="gender" value="male" />Male
|
||||
<input type="radio" name="gender" value="female" />Female
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Photo Upload</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="file" id="image" name="image" value="<?php if(isset($editData)) { echo $editData->profile_pic; } ?>" class="form-control typeFile" onchange="validateFile(this)" accept="image/png, image/jpeg, image/jpg, application/pdf">
|
||||
<img class="profilepic__image" style="width: 50%; display: block;padding:10px;" src="" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Permission</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br/>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Modules List<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="group_id[]" class="form-control select2_multiple" multiple >
|
||||
<?php foreach ($get_group_list as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->group_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_panel"><br>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<a href="<?php echo base_url();?>Employee/empList" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
<script>
|
||||
function matchnum(event) {
|
||||
var charcode;
|
||||
|
||||
function matchnum(event)
|
||||
{
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
if(charcode>= 48 && charcode <= 57)return true; //only numbers
|
||||
return false;
|
||||
if (charcode >= 48 && charcode <= 57) return true; //only numbers
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function validateKeyPress(event) {
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z.]$/;
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z.]$/;
|
||||
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function() {
|
||||
// $('.fa fa-chevron-up').click();
|
||||
// setTimeout(() => { $('#chevron1').click(); }, 500);
|
||||
});
|
||||
|
||||
|
||||
$(document).on('change','#image',function(){
|
||||
|
||||
const file = this.files[0];
|
||||
if (file){
|
||||
$(document).on('change', '#image', function() {
|
||||
|
||||
const file = this.files[0];
|
||||
if (file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function(event){
|
||||
$('#image').attr('src', event.target.result);
|
||||
$('.profilepic__image').attr('src', event.target.result);
|
||||
reader.onload = function(event) {
|
||||
$('#image').attr('src', event.target.result);
|
||||
$('.profilepic__image').attr('src', event.target.result);
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var dateFormat = "dd-mm-yy";
|
||||
var fromDateInput = $("#j_date");
|
||||
console.log(fromDateInput);
|
||||
|
||||
var dateFormat = "dd-mm-yy";
|
||||
var fromDateInput = $("#j_date");
|
||||
console.log(fromDateInput);
|
||||
fromDateInput.datepicker({
|
||||
dateFormat: dateFormat,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
yearRange: "1990:c",
|
||||
maxDate: new Date(),
|
||||
onSelect: function(dateText, inst) {
|
||||
|
||||
fromDateInput.datepicker({
|
||||
dateFormat: dateFormat,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
yearRange: "1990:c",
|
||||
maxDate: new Date(),
|
||||
onSelect: function (dateText, inst) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function validateKeyPress(event) {
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z._/]$/;
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z._/]$/;
|
||||
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function validateFile(input) {
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
// Invalid file type
|
||||
new PNotify({
|
||||
text: 'Invalid file type. Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
type: 'error',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
// Invalid file type
|
||||
new PNotify({
|
||||
text: 'Invalid file type. Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
type: 'error',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileExtension === "pdf") {
|
||||
// Preview PDF
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const pdfObject = `<embed src="${e.target.result}" width="500" height="600" type="application/pdf">`;
|
||||
document.getElementById("previewContainer").innerHTML = pdfObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
// Preview image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const imageObject = `<img src="${e.target.result}" alt="Preview" width="500">`;
|
||||
document.getElementById("previewContainer").innerHTML = imageObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
if (fileExtension === "pdf") {
|
||||
// Preview PDF
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const pdfObject = `<embed src="${e.target.result}" width="500" height="600" type="application/pdf">`;
|
||||
document.getElementById("previewContainer").innerHTML = pdfObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
// Preview image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const imageObject = `<img src="${e.target.result}" alt="Preview" width="500">`;
|
||||
document.getElementById("previewContainer").innerHTML = imageObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Get the select element
|
||||
var select = document.getElementById("module");
|
||||
|
||||
// Add event listener to handle checkbox selection
|
||||
select.addEventListener("change", function() {
|
||||
// Get the select element
|
||||
var select = document.getElementById("module");
|
||||
|
||||
// Add event listener to handle checkbox selection
|
||||
select.addEventListener("change", function() {
|
||||
var selectedOptions = Array.from(this.selectedOptions).map(option => option.value);
|
||||
console.log(selectedOptions); // You can perform further operations with the selected values
|
||||
});
|
||||
</script>
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -1,23 +1,21 @@
|
||||
|
||||
|
||||
<!-- Body page content -->
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>/assets/jquery.multi-select.js"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
$('#people').multiSelect();
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.multi-select-container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.multi-select-menu {
|
||||
@ -62,7 +60,7 @@
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.multi-select-menuitem + .multi-select-menuitem {
|
||||
.multi-select-menuitem+.multi-select-menuitem {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
@ -78,9 +76,9 @@
|
||||
|
||||
.multi-select-button {
|
||||
display: block;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
max-width: 100%!important;
|
||||
margin-top: 2px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
font-size: 0.875em;
|
||||
padding: 0.85em 0.6em;
|
||||
white-space: nowrap;
|
||||
@ -103,8 +101,8 @@
|
||||
border-color: #999 transparent transparent transparent;
|
||||
margin-left: 0.4em;
|
||||
vertical-align: 0.1em;
|
||||
right:5px;
|
||||
top:17px;
|
||||
right: 5px;
|
||||
top: 17px;
|
||||
}
|
||||
|
||||
.multi-select-container--open .multi-select-menu {
|
||||
@ -125,25 +123,24 @@
|
||||
/* Allow labels to line wrap when menu is artificially narrowed */
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Employee</h3>
|
||||
</div>
|
||||
<div class="title_left">
|
||||
<h3>Edit Employee</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title">
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
@ -153,390 +150,433 @@
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content"> -->
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Employee/editEmployees" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $editData->id; ?>">
|
||||
<input type="hidden" name="user_id" value="<?php echo $editData->user_id; ?>">
|
||||
|
||||
<div class="x_title">
|
||||
<h5>Personal Information<a style="color:red;">*</a></h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name"
|
||||
value="<?php if(isset($editData)) { echo $editData->name; } ?>" required="required"
|
||||
class="form-control " onkeypress="validateKeyPress(event)">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Email<a style="color:red;">*</a>
|
||||
</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="email" name="email"
|
||||
value="<?php if(isset($editData)) { echo $editData->email; } ?>" required="required"
|
||||
class="form-control" type="email"
|
||||
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
|
||||
oninvalid="setCustomValidity('Enter a Valid E-mail Address.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Mobile<a style="color:red;">*</a>
|
||||
</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="mobile" name="mobile"
|
||||
value="<?php if(isset($editData)) { echo $editData->mobile; } ?>"
|
||||
onkeypress="return matchnum(event)" required="required" class="form-control" type="tel"
|
||||
pattern="[6-9][0-9]{9}" minlength="10" maxlength="10"
|
||||
oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Department</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="department" name="department" class="form-control"
|
||||
placeholder="choose" <?php if(isset($viewData)) { echo "readonly"; } ?>>
|
||||
<option value="<?php echo $editData->department; ?>">
|
||||
<?php echo $editData->department; ?></option>
|
||||
<?php foreach ($departmentData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Join Date</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
|
||||
<input id="j_date" name="j_date"
|
||||
value="<?php if(isset($editData)) { echo $editData->j_date; } ?>" class="form-control"
|
||||
type="text" placeholder="DD-MM-YYYY" onkeypress="validateKeyPress(event)"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Manager</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="manager" name="manager" class="form-control">
|
||||
|
||||
<?php
|
||||
if(isset($manager_name[0]->id))
|
||||
{ foreach ($manager_name as $key => $val) { ?>
|
||||
|
||||
<option value="<?php if($val->id !== ''){echo $val->id;}else{echo '';} ?>"><?php if($val->name !== ''){echo $val->name;}else{echo '--select--';} ?></option>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<?php if ($val->name !== $value->name) { ?>
|
||||
<option value="<?php echo $value->user_id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } }?>
|
||||
|
||||
<?php } } else { ?>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<?php if ($val->name !== $value->name) { ?>
|
||||
<option value="<?php echo $value->user_id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } } } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Marital Status</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="marital_status" name="marital_status" class="form-control"
|
||||
placeholder="choose" <?php if(isset($viewData)) { echo "readonly"; } ?>>
|
||||
<option value="<?php echo $editData->marital_status; ?>">
|
||||
<?php echo ucfirst($editData->marital_status); ?></option>
|
||||
<?php
|
||||
if ($editData->marital_status != 'single')
|
||||
{
|
||||
echo '<option value="single">Single</option>';
|
||||
}
|
||||
if ($editData->marital_status != 'married')
|
||||
{
|
||||
echo '<option value="married">Married</option>';
|
||||
}
|
||||
if ($editData->marital_status != 'others')
|
||||
{
|
||||
echo '<option value="others">Others</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Emergency Contact </h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_name" name="relation_name"
|
||||
value="<?php if(isset($editData)) { echo $editData->relation_name; } ?>"
|
||||
onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Relationship</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relationship" name="relationship"
|
||||
value="<?php if(isset($editData)) { echo $editData->relationship; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_mobile" name="relation_mobile"
|
||||
value="<?php if(isset($editData)) { echo $editData->relation_mobile; } ?>"
|
||||
class="form-control " onkeypress="return matchnum(event)" class="form-control" type="tel"
|
||||
pattern="[6-9][0-9]{9}" minlength="10" maxlength="10"
|
||||
oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')"
|
||||
oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Home Tel</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relation_tel" name="relation_tel"
|
||||
value="<?php if(isset($editData)) { echo $editData->relation_tel; } ?>"
|
||||
onkeypress="return matchnum(event)" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ------------------------------------------->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Address Detail</h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Address</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="address" name="address"
|
||||
value="<?php if(isset($editData)) { echo $editData->address; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php if(isset($editData)) { echo $editData->city; } ?>"
|
||||
class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="state" name="state"
|
||||
value="<?php if(isset($editData)) { echo $editData->state; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Pincode</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="pincode" name="pincode"
|
||||
value="<?php if(isset($editData)) { echo $editData->pincode; } ?>"
|
||||
onkeypress="return matchnum(event)" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Additional Information</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Employee Id</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="emp_id" name="emp_id"
|
||||
value="<?php if(isset($editData)) { echo $editData->emp_id; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Salary</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="salary" name="salary"
|
||||
value="<?php if(isset($editData)) { echo $editData->salary; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Comment</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="comment" name="comment"
|
||||
value="<?php if(isset($editData)) { echo $editData->comment; } ?>" class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Gender</label>
|
||||
<div class="col-md-5 col-sm-5 " style="padding:10px;">
|
||||
<?php
|
||||
if ($editData->gender == 'male')
|
||||
{
|
||||
echo '<input type="radio" name="gender" value="male" checked/>Male';
|
||||
echo '  ';
|
||||
echo '<input type="radio" name="gender" value="female" />Female';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<input type="radio" name="gender" value="male"/>Male';
|
||||
echo '  ';
|
||||
echo '<input type="radio" name="gender" value="female" checked/>Female';
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Photo Upload</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="file" id="image" name="image"
|
||||
value="<?php if(isset($editData->profile_pic)) { echo $editData->profile_pic; } ?>"
|
||||
class="form-control " onchange="validateFile(this)">
|
||||
<img class="profilepic__image" style="width: 50%; display: block;padding:10px;"
|
||||
src="<?php echo base_url();?>/assets/uploads/<?php echo $editData->profile_pic ?>"
|
||||
alt="Avatar" title="Change the avatar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Permissions</h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Modules List</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="group_id[]" class="form-control select2_multiple" multiple>
|
||||
|
||||
<?php
|
||||
$modulesArray = [];
|
||||
|
||||
foreach ($get_members_list as $object) {
|
||||
if (isset($object->group_name)) {
|
||||
$modulesArray[] = $object->group_name;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($get_group_list as $key => $data) { ?>
|
||||
<?php if(in_array($data->group_name, $modulesArray)) { ?>
|
||||
<option value="<?php echo $data->id; ?>" selected> <?php echo $data->group_name; ?>
|
||||
</option>
|
||||
<?php } else { ?>
|
||||
<option value="<?php echo $data->id; ?>"><?php echo $data->group_name;?> </option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="ln_solid"></div> -->
|
||||
<div class="x_panel"><br>
|
||||
<div class="item form-group">
|
||||
<div class=" offset-md-8">
|
||||
<a href="<?php echo base_url();?>Employee/empList" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Employee/editEmployees" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $editData->id; ?>">
|
||||
<input type="hidden" name="user_id" value="<?php echo $editData->user_id; ?>">
|
||||
<!-- <div id="sub-value" class="col-md-12 col-sm-12">
|
||||
<?php echo $emp_sub_list_htmlPage; ?>
|
||||
</div> -->
|
||||
|
||||
<div class="x_title">
|
||||
<h5>Personal Information<a style="color:red;">*</a></h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="<?php if(isset($editData)) { echo $editData->name; } ?>" required="required" class="form-control " onkeypress="validateKeyPress(event)">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="email" name="email" value="<?php if(isset($editData)) { echo $editData->email; } ?>" required="required" class="form-control" type="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" oninvalid="setCustomValidity('Enter a Valid E-mail Address.')" oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Mobile<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="mobile" name="mobile" value="<?php if(isset($editData)) { echo $editData->mobile; } ?>" onkeypress = "return matchnum(event)" required="required" class="form-control" type="tel" pattern="[6-9][0-9]{9}" minlength="10" maxlength="10" oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')" oninput="setCustomValidity('')" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Department<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="department" name="department" required="required" class="form-control" placeholder="choose" <?php if(isset($viewData)) { echo "readonly"; } ?>>
|
||||
<option value="<?php echo $editData->department; ?>"><?php echo $editData->department; ?></option>
|
||||
<?php foreach ($departmentData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Joining Date<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
|
||||
<input id="j_date" name="j_date" value="<?php if(isset($editData)) { echo $editData->j_date; } ?>" class="form-control" type="text" placeholder="DD-MM-YYYY" required onkeypress="validateKeyPress(event)" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Manager</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="manager" name="manager" class="form-control">
|
||||
|
||||
<?php
|
||||
if(isset($manager_name[0]->id))
|
||||
{ foreach ($manager_name as $key => $val) { ?>
|
||||
|
||||
<option value="<?php echo $val->id; ?>"><?php echo $val->name; ?></option>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<?php if ($val->name !== $value->name) { ?>
|
||||
<option value="<?php echo $value->user_id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } }?>
|
||||
|
||||
<?php } } else { ?>
|
||||
<?php foreach ($manager as $key => $value) { ?>
|
||||
<?php if ($val->name !== $value->name) { ?>
|
||||
<option value="<?php echo $value->user_id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } } } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Gender</label>
|
||||
<div class="col-md-5 col-sm-5 " style="padding:10px;">
|
||||
<?php
|
||||
if ($editData->gender == 'male')
|
||||
{
|
||||
echo '<input type="radio" name="gender" value="male" checked/>Male';
|
||||
echo '  ';
|
||||
echo '<input type="radio" name="gender" value="female" />Female';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<input type="radio" name="gender" value="male"/>Male';
|
||||
echo '  ';
|
||||
echo '<input type="radio" name="gender" value="female" checked/>Female';
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Marital Status<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="marital_status" name="marital_status" required="required" class="form-control" placeholder="choose" <?php if(isset($viewData)) { echo "readonly"; } ?>>
|
||||
<option value="<?php echo $editData->marital_status; ?>"><?php echo ucfirst($editData->marital_status); ?></option>
|
||||
<?php
|
||||
if ($editData->marital_status != 'single')
|
||||
{
|
||||
echo '<option value="single">Single</option>';
|
||||
}
|
||||
if ($editData->marital_status != 'married')
|
||||
{
|
||||
echo '<option value="married">Married</option>';
|
||||
}
|
||||
if ($editData->marital_status != 'others')
|
||||
{
|
||||
echo '<option value="others">Others</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Emergency Contact </h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_name" name="relation_name" value="<?php if(isset($editData)) { echo $editData->relation_name; } ?>" onkeypress="validateKeyPress(event)" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Relationship</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relationship" name="relationship" value="<?php if(isset($editData)) { echo $editData->relationship; } ?>" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="relation_mobile" name="relation_mobile" value="<?php if(isset($editData)) { echo $editData->relation_mobile; } ?>" class="form-control " onkeypress = "return matchnum(event)" class="form-control" type="tel" pattern="[6-9][0-9]{9}" minlength="10" maxlength="10" oninvalid="setCustomValidity('cant start with number other than 6,7,8,9 or length must be 10.')" oninput="setCustomValidity('')">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Home Tel</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="relation_tel" name="relation_tel" value="<?php if(isset($editData)) { echo $editData->relation_tel; } ?>" onkeypress = "return matchnum(event)" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Address Detail</h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Address</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="address" name="address" value="<?php if(isset($editData)) { echo $editData->address; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> City</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php if(isset($editData)) { echo $editData->city; } ?>" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> State</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="state" name="state" value="<?php if(isset($editData)) { echo $editData->state; } ?>" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Pincode</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="pincode" name="pincode" value="<?php if(isset($editData)) { echo $editData->pincode; } ?>" onkeypress = "return matchnum(event)" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Additional Information</h5>
|
||||
<div class="clearfix"></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Employee Id</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="emp_id" name="emp_id" value="<?php if(isset($editData)) { echo $editData->emp_id; } ?>"class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="email"> Salary</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="salary" name="salary" value="<?php if(isset($editData)) { echo $editData->salary; } ?>" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Comment</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="comment" name="comment" value="<?php if(isset($editData)) { echo $editData->comment; } ?>" class="form-control" type="text">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Photo Upload</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="file" id="image" name="image" value="<?php if(isset($editData->profile_pic)) { echo $editData->profile_pic; } ?>" class="form-control " onchange="validateFile(this)">
|
||||
<img class="profilepic__image" style="width: 50%; display: block;padding:10px;" src="<?php echo base_url();?>/assets/uploads/<?php echo $editData->profile_pic ?>" alt="Avatar" title="Change the avatar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------------------- -->
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h5>Permissions</h5>
|
||||
<div class=""></div>
|
||||
</div><br />
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Modules List<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="people" name="group_id[]" class="form-control select2_multiple" multiple >
|
||||
|
||||
<?php
|
||||
|
||||
$modulesArray = [];
|
||||
|
||||
foreach ($get_members_list as $object) {
|
||||
if (isset($object->group_name)) {
|
||||
$modulesArray[] = $object->group_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ($get_group_list as $key => $data) { ?>
|
||||
<?php if(in_array($data->group_name, $modulesArray)) { ?>
|
||||
<option value="<?php echo $data->id; ?>" selected> <?php echo $data->group_name; ?> </option>
|
||||
<?php } else { ?>
|
||||
<option value="<?php echo $data->id; ?>"><?php echo $data->group_name;?> </option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="ln_solid"></div> -->
|
||||
<div class="x_panel"><br>
|
||||
<div class="item form-group">
|
||||
<div class=" offset-md-8">
|
||||
<a href="<?php echo base_url();?>Employee/empList" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div id="sub-value" class="col-md-12 col-sm-12">
|
||||
<?php echo $emp_sub_list_htmlPage; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#myDatepicker').datetimepicker({
|
||||
format: 'DD.MM.YYYY'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function matchnum(event)
|
||||
{
|
||||
var charcode;
|
||||
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
if(charcode>= 48 && charcode <= 57)return true; //only numbers
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function validateKeyPress(event) {
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z.]$/;
|
||||
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).on('change','#image',function(){
|
||||
|
||||
const file = this.files[0];
|
||||
if (file){
|
||||
let reader = new FileReader();
|
||||
reader.onload = function(event){
|
||||
$('#image').attr('src', event.target.result);
|
||||
$('.profilepic__image').attr('src', event.target.result);
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
$('#myDatepicker').datetimepicker({
|
||||
format: 'DD.MM.YYYY'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function matchnum(event) {
|
||||
var charcode;
|
||||
|
||||
var dateFormat = "dd-mm-yy";
|
||||
var fromDateInput = $("#j_date");
|
||||
console.log(fromDateInput);
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
fromDateInput.datepicker({
|
||||
dateFormat: dateFormat,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
maxDate: new Date(),
|
||||
onSelect: function (dateText, inst) {
|
||||
if (charcode >= 48 && charcode <= 57) return true; //only numbers
|
||||
return false;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validateKeyPress(event) {
|
||||
var key = event.key;
|
||||
var allowedCharacters = /^[A-Za-z.]$/;
|
||||
|
||||
if (!allowedCharacters.test(key)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).on('change', '#image', function() {
|
||||
|
||||
const file = this.files[0];
|
||||
if (file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
$('#image').attr('src', event.target.result);
|
||||
$('.profilepic__image').attr('src', event.target.result);
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var dateFormat = "dd-mm-yy";
|
||||
var fromDateInput = $("#j_date");
|
||||
console.log(fromDateInput);
|
||||
|
||||
fromDateInput.datepicker({
|
||||
dateFormat: dateFormat,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
maxDate: new Date(),
|
||||
onSelect: function(dateText, inst) {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function validateFile(input) {
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
// Invalid file type
|
||||
new PNotify({
|
||||
text: 'Invalid file type. Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
type: 'error',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
// Invalid file type
|
||||
new PNotify({
|
||||
text: 'Invalid file type. Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
type: 'error',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileExtension === "pdf") {
|
||||
// Preview PDF
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const pdfObject = `<embed src="${e.target.result}" width="500" height="600" type="application/pdf">`;
|
||||
document.getElementById("previewContainer").innerHTML = pdfObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
// Preview image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const imageObject = `<img src="${e.target.result}" alt="Preview" width="500">`;
|
||||
document.getElementById("previewContainer").innerHTML = imageObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
if (fileExtension === "pdf") {
|
||||
// Preview PDF
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const pdfObject = `<embed src="${e.target.result}" width="500" height="600" type="application/pdf">`;
|
||||
document.getElementById("previewContainer").innerHTML = pdfObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
// Preview image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const imageObject = `<img src="${e.target.result}" alt="Preview" width="500">`;
|
||||
document.getElementById("previewContainer").innerHTML = imageObject;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- /Body page content -->
|
||||
<!-- /Body page content -->
|
||||
@ -121,10 +121,10 @@
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Expense Name<a style="color:red;">*</a></label>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Expense Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' class="form-control" name="expense_name" value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->expense_name; } ?>" autocomplete='off' required />
|
||||
<input type='text' class="form-control" name="expense_name" value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->expense_name; } ?>" autocomplete='off' />
|
||||
|
||||
</div>
|
||||
|
||||
@ -181,7 +181,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1" required for="first-name">Recipt<a style="color:red;">*</a></label>
|
||||
<label class="control-label col-md-1 col-sm-1" required for="first-name">Recipt</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="bill[]" onchange="validateFile(this)" class="typeFile" type="file" value="<?php echo $value->bill ?>" multiple><br>
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
|
||||
<style>
|
||||
.alert-success {
|
||||
.alert-success {
|
||||
background-color: #dff0d8;
|
||||
color: #3c763d;
|
||||
border-color: #d6e9c6;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.flash-message {
|
||||
@ -22,8 +22,8 @@
|
||||
}
|
||||
|
||||
.hide-arrow {
|
||||
|
||||
-webkit-appearance: none;
|
||||
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
background-image: none;
|
||||
@ -32,282 +32,311 @@
|
||||
}
|
||||
|
||||
|
||||
.drop-zone {
|
||||
border: 2px dashed #ccc;
|
||||
padding: 20px;
|
||||
width: 257px;
|
||||
height:300px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
.drop-zone {
|
||||
border: 2px dashed #ccc;
|
||||
padding: 20px;
|
||||
width: 257px;
|
||||
height: 300px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 19px;
|
||||
margin-left: -18px !important;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 19px;
|
||||
margin-left: -18px !important;
|
||||
}
|
||||
|
||||
.preview-item {
|
||||
width: 100%;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.preview-item img,
|
||||
.preview-item object {
|
||||
width: 290px;
|
||||
height: 280px;
|
||||
width: 290px;
|
||||
height: 280px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_title">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<a href="<?php echo base_url();?>Expence/emp_expence_list" class="btn btn-primary" style="margin-top: 20px; font-size: small;">Back</a>
|
||||
</ul>
|
||||
<h3>Expense Claim</h3>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<a href="<?php echo base_url();?>Expence/emp_expence_list" class="btn btn-primary"
|
||||
style="margin-top: 20px; font-size: small;">Back</a>
|
||||
</ul>
|
||||
<h3>Expense Claim</h3>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Expence/rise_expence_request" enctype="multipart/form-data">
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>Expence/rise_expence_request" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<div class="x_panel">
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-2 col-sm-2 label-align" for="last-name">Expense Requisted For</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
|
||||
<input type="radio" name="created_by" value="self (<?php echo user()->id;?>)"style="margin:10px;"checked /><b>Self</b>
|
||||
<div class="x_panel">
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-2 col-sm-2 label-align" for="last-name">Expense Requisted
|
||||
For</label>
|
||||
<div class="col-md-4 col-sm-4">
|
||||
|
||||
<input type="radio" name="created_by" value="<?php echo user()->name;?> (<?php echo user()->id;?>)" style="margin: 10px;" /><b>Others</b>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name"> Employee Name <a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="user_dropdown" name="emp_id" style="margin-top: 10px;padding-bottom: 10px;" class="form-control manager" > </select>
|
||||
</div>
|
||||
<input type="radio" name="created_by" value="self (<?php echo user()->id;?>)"
|
||||
style="margin:10px;" checked /><b>Self</b>
|
||||
|
||||
</div>
|
||||
<input type="radio" name="created_by"
|
||||
value="<?php echo user()->name;?> (<?php echo user()->id;?>)"
|
||||
style="margin: 10px;" /><b>Others</b>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name"> Employee Name <a
|
||||
style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="user_dropdown" name="emp_id" style="margin-top: 10px;padding-bottom: 10px;"
|
||||
class="form-control manager"> </select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name">Expense Name<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' class="form-control" name="expense_name" value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->expense_name; } ?>" autocomplete='off' required />
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name">Expense Name</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' class="form-control" name="expense_name"
|
||||
value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->expense_name; } ?>"
|
||||
autocomplete='off' />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name">Business Reason</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' class="form-control" name="business_reason" value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->business_reason; } ?>" autocomplete='off'/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name">Business
|
||||
Reason</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' class="form-control" name="business_reason"
|
||||
value="<?php if(isset($expense_data[0]->id)){echo $expense_data[0]->business_reason; } ?>"
|
||||
autocomplete='off' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<button type="button" id="add-button" onclick="createAndAppendFormGroup()" class="btn btn-info" style="font-size:small;" >Add</button>
|
||||
</ul> -->
|
||||
<div class="clearfix"></div>
|
||||
</div><br>
|
||||
<div class="clearfix"></div>
|
||||
</div><br>
|
||||
|
||||
<?php if(isset($expense_child_data[0]->id)) { foreach ($expense_child_data as $key => $value) { ?>
|
||||
<?php if(isset($expense_child_data[0]->id)) { foreach ($expense_child_data as $key => $value) { ?>
|
||||
|
||||
<div class="item form-group">
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='date' id='ExpenseDate' class="form-control" placeholder="DD-MM-YYYY" required name="date_of_expence[]" value="<?php echo $value->date_of_expense ?>" autocomplete='off' />
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="expense_pid" value="<?php echo $expense_data[0]->id; ?>">
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a
|
||||
style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='date' id='ExpenseDate' class="form-control" placeholder="DD-MM-YYYY"
|
||||
required name="date_of_expence[]" value="<?php echo $value->date_of_expense ?>"
|
||||
autocomplete='off' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Expense Cost <a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="cost" name="amount[]" required value="<?php echo $value->amount ?>" class="form-control" onkeypress = "return matchnum(event)" type="number" name="middle-name" autocomplete='off'>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="expense_pid" value="<?php echo $expense_data[0]->id; ?>">
|
||||
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Expense Cost <a
|
||||
style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="cost" name="amount[]" required value="<?php echo $value->amount ?>"
|
||||
class="form-control" onkeypress="return matchnum(event)" type="number"
|
||||
name="middle-name" autocomplete='off'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group flex-wrap">
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>
|
||||
<div class="col-md-5 col-sm-3">
|
||||
<textarea id="comments" name="description[]" value="" class="form-control" style="height:50px !important;" type="text" ><?php echo $value->description ?></textarea>
|
||||
|
||||
<!-- <input type="hidden" id="manager_id" name="manager" value=""> -->
|
||||
<div class="item form-group flex-wrap">
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>
|
||||
<div class="col-md-5 col-sm-3">
|
||||
<textarea id="comments" name="description[]" value="" class="form-control"
|
||||
style="height:50px !important;" type="text"><?php echo $value->description ?></textarea>
|
||||
|
||||
<!-- <input type="hidden" id="manager_id" name="manager" value=""> -->
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align"
|
||||
for="first-name">Recipt</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="bill[]" onchange="validateFile(this)" class="typeFile"
|
||||
type="file" value="<?php echo $value->bill ?>" multiple>
|
||||
</div>
|
||||
<div class="col-12"><button type="button" class="float-right btn btn-danger"
|
||||
onclick="remove_row(<?php echo $value->id ?>)" id="remove-button2"><i
|
||||
class="fa fa-trash"></i></button></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php } } else { ?>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a
|
||||
style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' id='ExpenseDate' class="form-control" placeholder="DD-MM-YYYY"
|
||||
required name="date_of_expence[]" value="" autocomplete='off' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Amount <a
|
||||
style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="cost" name="amount[]" required value="" class="form-control"
|
||||
onkeypress="return matchnum(event)" type="number" name="middle-name" autocomplete='off'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>
|
||||
<div class="col-md-5 col-sm-3">
|
||||
<textarea id="comments" name="description[]" value="" class="form-control"
|
||||
style="height:50px !important;" type="text"></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" required for="first-name">Recipt</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="bill[]" onchange="validateFile(this)" class="typeFile"
|
||||
type="file" value="" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><button type="button" id="add-button" onclick="createAndAppendFormGroup()"
|
||||
class="btn btn-primary float-right">Add</button></div>
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div id="formContainer"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class=" offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" name="save">Save</button>
|
||||
<?php if(isset($expense_data[0]->id)) { ?>
|
||||
<button type="submit" class="btn btn-success" name="submit">Submit</button>
|
||||
<button type="submit" class="btn btn-warning" name="update">Update</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" required for="first-name">Recipt<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="bill[]" onchange="validateFile(this)" class="typeFile" type="file" value="<?php echo $value->bill ?>" required multiple>
|
||||
</div>
|
||||
<div class="col-12"><button type="button" class="float-right btn btn-danger" onclick="remove_row(<?php echo $value->id ?>)" id="remove-button2"><i class="fa fa-trash"></i></button></div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php } } else { ?>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<div class="form-group">
|
||||
<input type='text' id='ExpenseDate' class="form-control" placeholder="DD-MM-YYYY" required name="date_of_expence[]" value="" autocomplete='off' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Amount <a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="cost" name="amount[]" required value="" class="form-control" onkeypress = "return matchnum(event)" type="number" name="middle-name" autocomplete='off'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>
|
||||
<div class="col-md-5 col-sm-3">
|
||||
<textarea id="comments" name="description[]" value="" class="form-control" style="height:50px !important;" type="text" ></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 label-align" required for="first-name">Recipt<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="formFile" name="bill[]" onchange="validateFile(this)" class="typeFile" type="file" value="" required multiple></div>
|
||||
</div><div class="col-12"><button type="button" id="add-button" onclick="createAndAppendFormGroup()" class="btn btn-primary float-right">Add</button></div>
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div id="formContainer"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class=" offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" name="save">Save</button>
|
||||
<?php if(isset($expense_data[0]->id)) { ?>
|
||||
<button type="submit" class="btn btn-success" name="submit">Submit</button>
|
||||
<button type="submit" class="btn btn-warning" name="update">Update</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /Body page content -->
|
||||
|
||||
<script>
|
||||
|
||||
// hide the dropdown arrow
|
||||
|
||||
$(document).ready(function() {
|
||||
// hide the dropdown arrow
|
||||
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
$("input[name='created_by']").on("change", function() {
|
||||
var inputValue = $(this).val();
|
||||
if (inputValue === "<?php echo user()->name;?> (<?php echo user()->id;?>)") {
|
||||
$("#user_dropdown").removeClass("hide-arrow");
|
||||
} else {
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
}
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
})
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
$("input[name='created_by']").on("change", function() {
|
||||
var inputValue = $(this).val();
|
||||
if (inputValue === "<?php echo user()->name;?> (<?php echo user()->id;?>)") {
|
||||
$("#user_dropdown").removeClass("hide-arrow");
|
||||
} else {
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
const datepickerInput = document.getElementById('ExpenseDate');
|
||||
flatpickr(datepickerInput, {
|
||||
dateFormat: 'd-m-Y',
|
||||
flatpickr(datepickerInput, {
|
||||
dateFormat: 'd-m-Y',
|
||||
maxDate: new Date(),
|
||||
|
||||
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
console.log('Selected date: ', dateStr);
|
||||
console.log('Selected date: ', dateStr);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function validateFile(input) {
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png", "pdf"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
new PNotify({
|
||||
title: 'Invalid file type.',
|
||||
text: 'Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
new PNotify({
|
||||
title: 'Invalid file type.',
|
||||
text: 'Only JPG, JPEG, PNG, and PDF files are allowed.',
|
||||
styling: 'bootstrap3'
|
||||
});
|
||||
input.value = "";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function matchnum(event) {
|
||||
var charcode;
|
||||
|
||||
function matchnum(event)
|
||||
{
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
charcode = event.which || event.keyCode;
|
||||
|
||||
if(charcode>= 48 && charcode <= 57)return true; //only numbers
|
||||
return false;
|
||||
if (charcode >= 48 && charcode <= 57) return true; //only numbers
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var currentUserName = '<?php echo user()->name; ?>';
|
||||
var currentUserId = '<?php echo user()->id; ?>';
|
||||
$('#user_dropdown').append('<option value="' + currentUserId + '">' +
|
||||
$(document).ready(function() {
|
||||
|
||||
var currentUserName = '<?php echo user()->name; ?>';
|
||||
var currentUserId = '<?php echo user()->id; ?>';
|
||||
$('#user_dropdown').append('<option value="' + currentUserId + '">' +
|
||||
currentUserName + '</option>');
|
||||
$('#user_dropdown').prop('disabled', true);
|
||||
$('#user_dropdown').prop('disabled', true);
|
||||
|
||||
$('#user_dropdown').on('change',function() {
|
||||
|
||||
});
|
||||
$('#user_dropdown').on('change', function() {
|
||||
|
||||
$('input[type="radio"][name="created_by"]').change(function() {
|
||||
});
|
||||
|
||||
$('input[type="radio"][name="created_by"]').change(function() {
|
||||
|
||||
|
||||
var selectedValue = $(this).val();
|
||||
@ -316,20 +345,21 @@ function matchnum(event)
|
||||
$userDropdown.empty();
|
||||
|
||||
if (selectedValue === 'self (<?php echo user()->id;?>)') {
|
||||
|
||||
|
||||
var currentUserName = '<?php echo user()->name; ?>';
|
||||
var currentUserId = '<?php echo user()->id; ?>';
|
||||
$userDropdown.append('<option value="' + currentUserId + '">' + currentUserName + '</option>');
|
||||
$userDropdown.append('<option value="' + currentUserId + '">' + currentUserName +
|
||||
'</option>');
|
||||
$userDropdown.prop('disabled', true);
|
||||
} else if (selectedValue === '<?php echo user()->name; ?> (<?php echo user()->id;?>)') {
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('Expence/get_emp_name/')?>"',
|
||||
url: '<?php echo base_url('Expence/get_emp_name/')?>"',
|
||||
method: 'GET',
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
|
||||
$('#user_dropdown').append(response);
|
||||
$('#user_dropdown').append(response);
|
||||
$('#user_dropdown').prop('disabled', false);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@ -338,77 +368,85 @@ function matchnum(event)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
<script>
|
||||
//get manager id from the dropdown employee assign the value to $("#manager_id") input field
|
||||
|
||||
$("#user_dropdown").on("change", function(){
|
||||
let manager_id = $(this).children(":selected").attr("id");
|
||||
$("#user_dropdown").on("change", function() {
|
||||
let manager_id = $(this).children(":selected").attr("id");
|
||||
|
||||
console.log(manager_id);
|
||||
console.log(manager_id);
|
||||
|
||||
$("#manager_id").val(manager_id);
|
||||
|
||||
$("#manager_id").val(manager_id);
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var i = 1;
|
||||
|
||||
<script>
|
||||
var i=1;
|
||||
function createAndAppendFormGroup() {
|
||||
var html1 = '';
|
||||
i++
|
||||
html1 += '<div id="removeChild'+i+'">'
|
||||
html1 += '<br><div class="x_title">'+i+'</div><br>'
|
||||
html1 += '<div class="item form-group">';
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a style="color:red;">*</a></label>';
|
||||
html1 += '<div class="col-md-5 col-sm-5 "><div class="form-group"><input type="text" id="datepicker'+i+'" class="form-control date-picker" placeholder="DD-MM-YYYY" required name="date_of_expence[]" value="" autocomplete="off"/></div></div>';
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Expense Cost <a style="color:red;">*</a></label>';
|
||||
html1 += '<div class="col-md-5 col-sm-5 "><input id="cost" name="amount[]" required class="form-control" onkeypress="return matchnum(event)" type="number" name="middle-name" autocomplete="off"></div>';
|
||||
html1 += '</div>';
|
||||
var html1 = '';
|
||||
i++
|
||||
html1 += '<div id="removeChild' + i + '">'
|
||||
html1 += '<br><div class="x_title">' + i + '</div><br>'
|
||||
html1 += '<div class="item form-group">';
|
||||
html1 +=
|
||||
'<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Date of Expense<a style="color:red;">*</a></label>';
|
||||
html1 += '<div class="col-md-5 col-sm-5 "><div class="form-group"><input type="text" id="datepicker' + i +
|
||||
'" class="form-control date-picker" placeholder="DD-MM-YYYY" required name="date_of_expence[]" value="" autocomplete="off"/></div></div>';
|
||||
html1 +=
|
||||
'<label class="control-label col-md-1 col-sm-1 label-align" for="first-name"> Expense Cost <a style="color:red;">*</a></label>';
|
||||
html1 +=
|
||||
'<div class="col-md-5 col-sm-5 "><input id="cost" name="amount[]" required class="form-control" onkeypress="return matchnum(event)" type="number" name="middle-name" autocomplete="off"></div>';
|
||||
html1 += '</div>';
|
||||
|
||||
|
||||
html1 += '<div class="item form-group flex-wrap">'
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>'
|
||||
html1 += '<div class="col-md-5 col-sm-3"><textarea id="comments" name="description[]" value="" class="form-control" style="height:50px !important;" type="text" ></textarea></div>'
|
||||
html1 += '<div class="item form-group flex-wrap">'
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" for="last-name">Description</label>'
|
||||
html1 +=
|
||||
'<div class="col-md-5 col-sm-3"><textarea id="comments" name="description[]" value="" class="form-control" style="height:50px !important;" type="text" ></textarea></div>'
|
||||
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" required for="first-name">Upload Bill </label>'
|
||||
html1 += '<div class="col-md-5 col-sm-5 "><input id="formFile" name="bill[]" multiple onchange="validateFile(this)" class="typeFile" type="file" value="" required></div>'
|
||||
html1 += '</div>'
|
||||
html1 += '<div class="col-12"><button type="button" class="float-right btn btn-danger"" id="remove-button" onclick="removebutton('+i+')"><i class="fa fa-trash"></i></button></div><button type="button" id="add-button" onclick="createAndAppendFormGroup()" class="btn btn-primary float-right">Add</button></div>'
|
||||
html1 += '<label class="control-label col-md-1 col-sm-1 label-align" for="first-name">Recipt </label>'
|
||||
html1 +=
|
||||
'<div class="col-md-5 col-sm-5 "><input id="formFile" name="bill[]" multiple onchange="validateFile(this)" class="typeFile" type="file" value="" ></div>'
|
||||
html1 += '</div>'
|
||||
html1 +=
|
||||
'<div class="col-12"><button type="button" class="float-right btn btn-danger"" id="remove-button" onclick="removebutton(' +
|
||||
i +
|
||||
')"><i class="fa fa-trash"></i></button></div><button type="button" id="add-button" onclick="createAndAppendFormGroup()" class="btn btn-primary float-right">Add</button></div>'
|
||||
|
||||
|
||||
var formContainer = document.getElementById('formContainer');
|
||||
//formContainer.innerHTML += html1;
|
||||
formContainer.insertAdjacentHTML('beforeend', html1);
|
||||
var formContainer = document.getElementById('formContainer');
|
||||
//formContainer.innerHTML += html1;
|
||||
formContainer.insertAdjacentHTML('beforeend', html1);
|
||||
|
||||
const datepickerInput = document.getElementById('datepicker'+i);
|
||||
flatpickr(datepickerInput, {
|
||||
dateFormat: 'd-m-Y',
|
||||
maxDate: new Date(),
|
||||
autoclose:true,
|
||||
const datepickerInput = document.getElementById('datepicker' + i);
|
||||
flatpickr(datepickerInput, {
|
||||
dateFormat: 'd-m-Y',
|
||||
maxDate: new Date(),
|
||||
autoclose: true,
|
||||
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
console.log('Selected date: ', dateStr);
|
||||
}
|
||||
});
|
||||
onChange: function(selectedDates, dateStr) {
|
||||
console.log('Selected date: ', dateStr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function removebutton(index) {
|
||||
//console.log(index)
|
||||
var element = document.getElementById('removeChild'+ index);
|
||||
//console.log(element)
|
||||
if (element) {
|
||||
element.remove();
|
||||
}
|
||||
function removebutton(index) {
|
||||
//console.log(index)
|
||||
var element = document.getElementById('removeChild' + index);
|
||||
//console.log(element)
|
||||
if (element) {
|
||||
element.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// function date(date){
|
||||
@ -424,11 +462,9 @@ function removebutton(index) {
|
||||
// todayHighlight: true,
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- <script>
|
||||
<!-- <script>
|
||||
function PreviewImage() {
|
||||
var oFReader = new FileReader();
|
||||
oFReader.readAsDataURL(document.getElementById("formFile").files[0]);
|
||||
@ -440,26 +476,24 @@ function PreviewImage() {
|
||||
</script> -->
|
||||
|
||||
<script>
|
||||
|
||||
function remove_row(id)
|
||||
{
|
||||
$.ajax({
|
||||
function remove_row(id) {
|
||||
$.ajax({
|
||||
|
||||
data:{id : id},
|
||||
url:"<?php echo base_url('Expence/remove_row');?>",
|
||||
type:"get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
url: "<?php echo base_url('Expence/remove_row');?>",
|
||||
type: "get",
|
||||
success: function(response) {
|
||||
|
||||
if(response==true);
|
||||
{
|
||||
location.reload(true)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (response == true); {
|
||||
location.reload(true)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -6,13 +6,13 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="images/favicon.ico" type="image/ico" />
|
||||
<link rel="icon" href="<?php echo base_url(); ?>/assets/appimg/default.ico" />
|
||||
|
||||
|
||||
<!---ajax call--->
|
||||
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> -->
|
||||
|
||||
<title>Ams</title>
|
||||
<title>Ams</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?php echo base_url(); ?>/assets/default/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
@ -112,7 +112,7 @@
|
||||
<?php if (is_admin() || is_user() || Employee_group()) { ?>
|
||||
<a class="dropdown-item" href="<?php echo base_url()?>Asset/masterDataList/">Masters</a>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item" href="#">Settings</a>
|
||||
<!-- <a class="dropdown-item" href="#">Settings</a> -->
|
||||
<!-- <a class="dropdown-item" href="javascript:;">Help</a> -->
|
||||
<a class="dropdown-item" href="<?php echo base_url();?>Auth/logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
|
||||
</div>
|
||||
|
||||
@ -1,178 +1,186 @@
|
||||
<div class="col-md-3 left_col menu_fixed">
|
||||
<div class="left_col scroll-view">
|
||||
<div class="navbar nav_title" style="border: 0;">
|
||||
<a class="site_title">
|
||||
<?php if(check_auth() && is_superadmin()) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $settings->logo;?>" class="img-circle logo">
|
||||
<div class="col-md-3 left_col menu_fixed">
|
||||
<div class="left_col scroll-view">
|
||||
<div class="navbar nav_title" style="border: 0;">
|
||||
<a class="site_title">
|
||||
<?php if(check_auth() && is_superadmin()) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $settings->logo;?>"
|
||||
class="img-circle logo">
|
||||
|
||||
<?php } else if(check_auth() && is_admin() || !is_null(is_user())) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $business->logo;?>" class="img-circle logo">
|
||||
<?php } ?>
|
||||
<span>
|
||||
<?php if(check_auth() && is_admin() || !is_null(is_user()))
|
||||
<?php } else if(check_auth() && is_admin() || !is_null(is_user())) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $business->logo;?>"
|
||||
class="img-circle logo">
|
||||
<?php } ?>
|
||||
<span>
|
||||
<?php if(check_auth() && is_admin() || !is_null(is_user()))
|
||||
{echo $business->business_name;}
|
||||
else if(check_auth() && is_superadmin())
|
||||
{ echo $settings->site_name; }?>
|
||||
</span></a>
|
||||
</div>
|
||||
</span></a>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<!-- menu profile quick info -->
|
||||
<div class="profile clearfix">
|
||||
<div class="profile_pic">
|
||||
<?php if(user()->profile_image == '' || user()->profile_image == null) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="..." class="img-circle profile_img">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/<?php echo user()->profile_image; ?>"
|
||||
alt="..." class="img-circle profile_img">
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<div class="profile_info">
|
||||
<span>Welcome,</span>
|
||||
<h2> <?php if(check_auth() && is_admin() || is_user()){echo user()->name;}else{echo user()->name; }?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /menu profile quick info -->
|
||||
<!-- menu profile quick info -->
|
||||
<div class="profile clearfix">
|
||||
<div class="profile_pic">
|
||||
<?php if(user()->profile_image == '' || user()->profile_image == null) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="..."
|
||||
class="img-circle profile_img">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/<?php echo user()->profile_image; ?>"
|
||||
alt="..." class="img-circle profile_img">
|
||||
|
||||
<br />
|
||||
<?php } ?>
|
||||
|
||||
<!-- sidebar menu -->
|
||||
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
|
||||
<div class="menu_section">
|
||||
<h3>General</h3>
|
||||
<ul class="nav side-menu">
|
||||
<li><a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Auth/">Dashboard</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
<div class="profile_info">
|
||||
<span>Welcome,</span>
|
||||
<h2> <?php if(check_auth() && is_admin() || is_user()){echo user()->name;}else{echo user()->name; }?>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /menu profile quick info -->
|
||||
|
||||
<?php if(check_auth() && is_superadmin() ) { ?>
|
||||
<li><a><i class="fa fa-archive"></i> Business <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Business/business_list">Business List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Business/add_business">Add Business</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<br />
|
||||
|
||||
<!-- sidebar menu -->
|
||||
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
|
||||
<div class="menu_section">
|
||||
<h3>General</h3>
|
||||
<ul class="nav side-menu">
|
||||
<li><a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Auth/">Dashboard</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php if(check_auth() && is_superadmin() ) { ?>
|
||||
<li><a><i class="fa fa-archive"></i> Business <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Business/business_list">Business List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Business/add_business">Add Business</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if(check_auth() && is_superadmin() ) { ?>
|
||||
|
||||
<li><a><i class="fa fa-user"></i> Module <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Business/module_list">Module List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Business/add_module">Add Module</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_admin() ) { ?>
|
||||
|
||||
<li><a><i class="fa fa-user"></i>Group <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Group/Group_list">Group List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Group/Create_Group_Form">Add Group</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if(check_auth() && is_superadmin() ) { ?>
|
||||
|
||||
|
||||
|
||||
<?php if(check_auth() && is_admin() && Asset_module() || Employee_group() ) { ?>
|
||||
<li><a><i class="fa fa-university"></i> Assets <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Asset/assetLandingPage">Assets List</a></li>
|
||||
<?php if(user()->action_permit != 'view' ) { ?>
|
||||
<li><a href="<?php echo base_url();?>Asset/addAsset">Add Asset</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li><a><i class="fa fa-user"></i> Module <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Business/module_list">Module List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Business/add_module">Add Module</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<!-- <?php if(check_auth() && is_admin() ) { ?>
|
||||
|
||||
|
||||
<?php if(check_auth() && is_admin() || is_superadmin() || is_user() ) { ?>
|
||||
<li><a><i class="fa fa-user"></i> Users <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>User/userList">Users List</a></li>
|
||||
<?php if(user()->action_permit != 'view' ) { ?>
|
||||
<li><a href="<?php echo base_url();?>User/addUser">Add Users</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if(check_auth() && is_admin() && Asset_module()) { ?>
|
||||
<li><a><i class="fa fa-clipboard"></i> Reports <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Asset/depreciation_report">Depreciation Reports</a></li>
|
||||
<li><a href="<?php echo base_url();?>Asset/amc_report">AMC Reports</a></li>
|
||||
<li><a href="<?php echo base_url();?>Asset/insurance_report">Insurance Reports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li><a><i class="fa fa-user"></i>Group <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Group/Group_list">Group List</a></li>
|
||||
<li><a href="<?php echo base_url();?>Group/Create_Group_Form">Add Group</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?> -->
|
||||
|
||||
|
||||
|
||||
<?php if(check_auth() && is_admin() || is_user() ) { ?>
|
||||
|
||||
<br><br>
|
||||
<h3>Employee</h3>
|
||||
<br>
|
||||
|
||||
<?php if(check_auth() && is_admin() && Asset_module() || Employee_group() ) { ?>
|
||||
<li><a><i class="fa fa-university"></i> Assets <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Asset/assetLandingPage">Assets List</a></li>
|
||||
<?php if(user()->action_permit != 'view' ) { ?>
|
||||
<li><a href="<?php echo base_url();?>Asset/addAsset">Add Asset</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<li><a href="<?php echo base_url();?>Employee/empList"><i class="fa fa-group"></i> Employee</a></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
<?php if(check_auth() && is_admin() || is_superadmin() || is_user() ) { ?>
|
||||
<li><a><i class="fa fa-user"></i> Users <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>User/userList">Users List</a></li>
|
||||
<?php if(user()->action_permit != 'view' ) { ?>
|
||||
<li><a href="<?php echo base_url();?>User/addUser">Add Users</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Leave/leavehistory"><i class="fa fa-calendar-times-o"></i>Leaves</a></li>
|
||||
|
||||
<?php } ?>
|
||||
<?php if(check_auth() && is_admin() && Asset_module()) { ?>
|
||||
<li><a><i class="fa fa-clipboard"></i> Reports <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>Asset/depreciation_report">Depreciation
|
||||
Reports</a></li>
|
||||
<li><a href="<?php echo base_url();?>Asset/amc_report">AMC Reports</a></li>
|
||||
<li><a href="<?php echo base_url();?>Asset/insurance_report">Insurance Reports</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Expence/emp_expence_list"><i class="fa fa-money"></i> Expense </a></li>
|
||||
|
||||
<?php } ?>
|
||||
<?php if(check_auth() && is_admin() || is_user() ) { ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
<br><br>
|
||||
<h3>Employee</h3>
|
||||
<br>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Delegation/Delegation_list"><i class="fa fa-tasks" aria-hidden="true"></i> Delegation</a></li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Employee/empList"><i class="fa fa-group"></i>
|
||||
Employee</a></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Leave/leavehistory"><i
|
||||
class="fa fa-calendar-times-o"></i>Leaves</a></li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Expence/emp_expence_list"><i class="fa fa-money"></i>
|
||||
Expense </a></li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if(check_auth() && is_user() || user()->role == null ) { ?>
|
||||
|
||||
<li><a href="<?php echo base_url();?>Delegation/Delegation_list"><i class="fa fa-tasks"
|
||||
aria-hidden="true"></i> Delegation</a></li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /sidebar menu -->
|
||||
|
||||
<!-- /menu footer buttons -->
|
||||
<div class="sidebar-footer hidden-small">
|
||||
<a data-toggle="tooltip" data-placement="top" title="Settings">
|
||||
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
|
||||
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="Lock">
|
||||
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="Logout" href="<?php echo base_url();?>Auth/logout">
|
||||
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="Settings">
|
||||
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="FullScreen">
|
||||
<span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="Lock">
|
||||
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a data-toggle="tooltip" data-placement="top" title="Logout" href="<?php echo base_url();?>Auth/logout">
|
||||
<span class="glyphicon glyphicon-off" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- /menu footer buttons -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -55,6 +55,8 @@ public function leaveList()
|
||||
|
||||
$business_id = user()->business_id;
|
||||
$leave_list = $this->Leave_model->get_leave_with_emp_name(user()->business_id);
|
||||
// echo '<pre>';
|
||||
// print_r($leave_list); die;
|
||||
$leave_type = $this->Leave_model->get_leave_type($business_id);
|
||||
$decline_dropdown = $this->Leave_model->decline_dropdown($business_id);
|
||||
$this->layout->set('tableData', $leave_list);
|
||||
@ -448,7 +450,7 @@ public function ApproveLeave()
|
||||
if($remaining_days[0]->remaining_days <= 0){
|
||||
|
||||
$data['status'] = 'Declined';
|
||||
$data['declined_by']= user()->name;
|
||||
$data['declined_by']= user()->id;
|
||||
$data['declined_at'] = date('d-m-Y H:i:s');
|
||||
$data['DReason'] = 'No sufficient leave balance';
|
||||
$this->Leave_model->LeaveDecline($id, $data);
|
||||
@ -462,8 +464,9 @@ public function ApproveLeave()
|
||||
$this->Leave_model->emp_leave_days_update($emp_id, $days, $leave_year, $business_id, $no_of_days->type);
|
||||
|
||||
$data['status'] = 'Approved';
|
||||
$data['approved_by']= user()->name;
|
||||
$data['approved_by']= user()->id;
|
||||
$data['approved_at'] = date('d-m-Y H:i:s');
|
||||
// print_r($data); die;
|
||||
$this->Leave_model->LeaveApprove($id, $data);
|
||||
redirect('Leave/leaveList');
|
||||
}
|
||||
@ -550,4 +553,4 @@ public function manager_approvel()
|
||||
$this->layout->render('Employee_Layout');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,12 @@ class Leave_model extends MY_Model {
|
||||
|
||||
public function get_leave_with_emp_name($business_id)
|
||||
{
|
||||
$this->db->select('A.* , name', 'users.name');
|
||||
$this->db->select('A.* ,U1.name as emp_name, U2.name as ApproveBy, U3.name as DeclineBy, U4.name as Risedby');
|
||||
$this->db->from('leave_list A');
|
||||
$this->db->join('users', 'users.id = A.emp_id', 'left');
|
||||
$this->db->join('users U1', 'U1.id = A.emp_id', 'left');
|
||||
$this->db->join('users U2', 'U2.id = A.approved_by', 'left');
|
||||
$this->db->join('users U3', 'U3.id = A.declined_by', 'left');
|
||||
$this->db->join('users U4', 'U4.id = A.risedby', 'left');
|
||||
$this->db->where('A.business_id', $business_id);
|
||||
$this->db->order_by('A.id','DESC');
|
||||
$this->db->where('A.is_active', 1);
|
||||
@ -13,6 +16,23 @@ public function get_leave_with_emp_name($business_id)
|
||||
$query = $query->result();
|
||||
return $query;
|
||||
|
||||
}
|
||||
|
||||
public function get_user_name($user_id){
|
||||
|
||||
$this->db->select('name');
|
||||
$this->db->from('users');
|
||||
$this->db->where('id', $user_id);
|
||||
$query = $this->db->get();
|
||||
// $query = $query->result();
|
||||
if ($query->num_rows() > 0) {
|
||||
$row = $query->row();
|
||||
return $row->name;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
// return $query;
|
||||
|
||||
}
|
||||
|
||||
public function get_with_emp_name($business_id, )
|
||||
|
||||
@ -145,17 +145,16 @@
|
||||
|
||||
<label class="control-label col-md-2 col-sm-2 " for="last-name">Leave Applied For</label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
|
||||
<input type="radio" id="self" name="risedby" value="self(<?php echo user()->id;?>)"style="margin:10px;"checked /><b>Self</b>
|
||||
|
||||
<input type="radio" id="others" name="risedby" value="<?php echo user()->name;?>(<?php echo user()->id;?>)" style="margin: 10px;" /><b>Others</b>
|
||||
<input type="radio" id="self" name="risedby" value="self(<?php echo user()->id;?>)"style="margin:10px;"checked /><b>Self</b>
|
||||
<input type="radio" id="others" name="risedby" value="<?php echo user()->name;?>" style="margin: 10px;" /><b>Others</b>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-2 col-sm-2 " for="last-name"> Employee Name </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="user_dropdown" name="emp_id" style="margin-top: 10px;padding-bottom: 10px;" class="form-control manager"> </select>
|
||||
<select id="user_dropdown" name="emp_id" style="margin-top: 10px;padding-bottom: 10px;" class="form-control manager" required></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -271,7 +270,7 @@
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
$("input[name='risedby']").on("change", function() {
|
||||
var inputValue = $(this).val();
|
||||
if (inputValue === "<?php echo user()->name;?>(<?php echo user()->id;?>)") {
|
||||
if (inputValue === "<?php echo user()->name;?>") {
|
||||
$("#user_dropdown").removeClass("hide-arrow");
|
||||
} else {
|
||||
$("#user_dropdown").addClass("hide-arrow");
|
||||
@ -360,7 +359,7 @@
|
||||
var currentUserId = '<?php echo user()->id; ?>';
|
||||
$userDropdown.append('<option value="' + currentUserId + '">' + currentUserName + '</option>');
|
||||
$userDropdown.prop('disabled', true);
|
||||
} else if (selectedValue === '<?php echo user()->name; ?>(<?php echo user()->id;?>)') {
|
||||
} else if (selectedValue === '<?php echo user()->name; ?>') {
|
||||
|
||||
|
||||
$.ajax({
|
||||
@ -555,112 +554,15 @@ function calculateDateDifference() {
|
||||
|
||||
}
|
||||
|
||||
// $(document).ready(function() {
|
||||
|
||||
|
||||
// $('#type').change(function() {
|
||||
|
||||
// var leave_type_id = $('#type').val();
|
||||
// console.log(leave_type_id);
|
||||
// let employee_id = $('#user_dropdown').val();
|
||||
|
||||
// DateDifferenceOthers(leave_type_id, employee_id);
|
||||
// });
|
||||
|
||||
// });
|
||||
$('#subimt').click(function() {
|
||||
let val = $('#user_dropdown').val()
|
||||
console.log(val);
|
||||
});
|
||||
|
||||
|
||||
// function DateDifferenceOthers( leave_type_id, employee_id ) {
|
||||
|
||||
|
||||
// let type_id = leave_type_id;
|
||||
// let emp_id = employee_id;
|
||||
// // var type_id = $('option:selected', this).attr('id');
|
||||
// // let emp_id = $('#user_dropdown').val();
|
||||
|
||||
// var fromDate = fromDateInput.datepicker("getDate");
|
||||
// var toDate = toDateInput.datepicker("getDate");
|
||||
|
||||
// $.ajax({
|
||||
// data: {emp_id : emp_id, type_id : type_id},
|
||||
// url : "<?php echo base_url()?>Leave/get_emp_leave_count/",
|
||||
// type: "get",
|
||||
// success: function(response) {
|
||||
// response = JSON.parse(response);
|
||||
|
||||
// if (fromDate && toDate) {
|
||||
// var difference = Math.ceil((toDate - fromDate) / (1000 * 60 * 60 * 24) + 1);
|
||||
// if(response.length == 0)
|
||||
// {
|
||||
// $.ajax({
|
||||
// type: "get",
|
||||
// url: "<?php echo base_url()?>Leave/get_leave_master_count/",
|
||||
// data: {type_id: type_id},
|
||||
// success: function(response) {
|
||||
// response = JSON.parse(response);
|
||||
// if (difference > response[0].days)
|
||||
// {
|
||||
// Swal.fire('No sufficient leave balance please check the Date');
|
||||
// $("#todate").val('');
|
||||
// $("#dateDifference").val("");
|
||||
// }
|
||||
|
||||
// },
|
||||
|
||||
// });
|
||||
|
||||
// }
|
||||
// else{
|
||||
|
||||
// if (difference > response[0].remaining_days)
|
||||
// {
|
||||
|
||||
// Swal.fire('No sufficient leave balance please check the Date' );
|
||||
// $("#todate").val('');
|
||||
// $("#dateDifference").val("");
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// });
|
||||
|
||||
// }
|
||||
// $('#user_dropdown').on('change', function(){
|
||||
|
||||
// let emp_id = $('#user_dropdown').val();
|
||||
// DateValidate(emp_id);
|
||||
|
||||
|
||||
// });
|
||||
|
||||
// function DateValidate(emp_id) {
|
||||
|
||||
// var fromDate = fromDateInput.datepicker("getDate");
|
||||
// var toDate = toDateInput.datepicker("getDate");
|
||||
|
||||
// $.ajax({
|
||||
// data: {emp_id : emp_id, fromDate : fromDate, toDate : toDate},
|
||||
// url : "<?php echo base_url()?>Leave/get_from_to_date_count/",
|
||||
// type: "get",
|
||||
// success: function(response) {
|
||||
|
||||
// alert(response);
|
||||
|
||||
// response = JSON.parse(response);
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
@ -673,4 +575,3 @@ function calculateDateDifference() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
color: black;
|
||||
}
|
||||
|
||||
input[type=date]::-webkit-datetime-edit, input::-webkit-inner-spin-button, input::-webkit-clear-button {
|
||||
/* input[type=date]::-webkit-datetime-edit, input::-webkit-inner-spin-button, input::-webkit-clear-button {
|
||||
display: none;s
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
right: 0;
|
||||
color: black;
|
||||
opacity: 1;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@ -1,157 +1,162 @@
|
||||
|
||||
<head>
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css'>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css'>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<style>
|
||||
.modal_default {
|
||||
display: none;
|
||||
position: fixed;
|
||||
/* z-index: 1;*/
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
<style>
|
||||
.modal_default {
|
||||
display: none;
|
||||
position: fixed;
|
||||
/* z-index: 1;*/
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.modal-content_default {
|
||||
background-color: #fefefe;
|
||||
margin: 15% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 380px;
|
||||
height: 280px;
|
||||
text-align: center;
|
||||
}
|
||||
.modal-content_default {
|
||||
background-color: #fefefe;
|
||||
margin: 15% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 380px;
|
||||
height: 280px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_filter{
|
||||
margin-top: -30px !important; //search move to up
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
margin-top: -30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<a href="<?php echo base_url();?>Leave/LeaveHistory" class="btn btn-sm btn-primary" style="margin-top: 20px;" >Back</a>
|
||||
</ul>
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<h1>My Approvals</h1>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="overflow: auto;">
|
||||
<table id="datatables" class="table table-striped table-bordered" width="100%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<th hidden class="column-title">id</th>
|
||||
<th class="column-title">Created Date/Time</th>
|
||||
<th class="column-title">Employee Name </th>
|
||||
<th class="column-title">Note</th>
|
||||
<th class="column-title">Leave Duration </th>
|
||||
<th class="column-title">Leave Type </th>
|
||||
<th class="column-title">Leave Raised By</th>
|
||||
<th class="column-title">No of Days </th>
|
||||
<th class="column-title">Status </th>
|
||||
<th class="column-title" >Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tableData as $key => $value) { ?>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<a href="<?php echo base_url();?>Leave/LeaveHistory" class="btn btn-sm btn-primary"
|
||||
style="margin-top: 20px;">Back</a>
|
||||
</ul>
|
||||
|
||||
<?php foreach ($leave_type as $leave => $type) { ?>
|
||||
<?php if($type->id === $value->type ) { ?>
|
||||
<tr class="even pointer">
|
||||
<td hidden ><?php echo $value->id; ?></td>
|
||||
<td class=" "><?php echo $value->created_date; ?><br><?php echo $value->created_time; ?></td>
|
||||
<td class=" "><?php echo $value->name; ?> (<?php echo $value->emp_id; ?>) </td>
|
||||
<td class=" "><?php echo $value->comments; ?></td>
|
||||
<?php if($value->from_date == "" && $value->to_date == "") { ?>
|
||||
<td class="">
|
||||
<?php echo dateFormat('d-m-Y',$value->perm_date);?><br>
|
||||
<?php echo timeFormat('h:i a', $value->from_time); ?> to
|
||||
<?php echo timeFormat('h:i a', $value->to_time);?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
|
||||
<td class=" "> <?php echo dateFormat('d-m-Y',$value->from_date); echo ' to ';?> <?php echo dateFormat('d-m-Y',$value->to_date);?> </td>
|
||||
<?php } ?>
|
||||
|
||||
<td class=" "><?php echo $type->type; ?></td>
|
||||
|
||||
<td class=" "><?php echo $value->risedby; ?></td>
|
||||
<?php if($value->no_of_days == 0){ ?>
|
||||
<td class=" ">---</td>
|
||||
<?php } else { ?>
|
||||
<td class=""><?php echo $value->no_of_days; ?></td>
|
||||
<?php } ?>
|
||||
<?php if($value->status == 'pending'){ ?>
|
||||
<td style="color:#e68a00"><?php echo $value->status; ?></td>
|
||||
<?php }
|
||||
else if($value->status == 'Approved'){ ?>
|
||||
<td style="color:green"><?php echo $value->status; ?> By <?php echo $value->approved_by; ?><br><?php echo $value->approved_at; ?></td>
|
||||
<?php }
|
||||
else if($value->status == 'Declined'){ ?>
|
||||
<td style="color:red"><?php echo $value->status; ?> By <?php echo $value->declined_by; ?> <br>" <?php echo $value->DReason; ?> "</td>
|
||||
<?php }
|
||||
else if($value->status == 'canceled'){ ?>
|
||||
<td style="color:darkcyan;"><?php echo $value->status; ?></td>
|
||||
<?php }
|
||||
else{
|
||||
<h1>My Approvals</h1>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="overflow: auto;">
|
||||
<table id="datatables" class="table table-striped table-bordered" width="100%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<th hidden class="column-title">id</th>
|
||||
<th class="column-title">Created Date/Time</th>
|
||||
<th class="column-title">Employee Name </th>
|
||||
<th class="column-title">Note</th>
|
||||
<th class="column-title">Leave Duration </th>
|
||||
<th class="column-title">Leave Type </th>
|
||||
<th class="column-title">Leave Raised By</th>
|
||||
<th class="column-title">No of Days </th>
|
||||
<th class="column-title">Status </th>
|
||||
<th class="column-title">Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tableData as $key => $value) { ?>
|
||||
|
||||
}?>
|
||||
<td style=" text-align: center; font-size: 16px;">
|
||||
<?php foreach ($leave_type as $leave => $type) { ?>
|
||||
<?php if($type->id === $value->type ) { ?>
|
||||
<tr class="even pointer">
|
||||
<td hidden><?php echo $value->id; ?></td>
|
||||
<td class=" "><?php echo $value->created_date; ?><br><?php echo $value->created_time; ?>
|
||||
</td>
|
||||
<td class=" "><?php echo $value->emp_name; ?></td>
|
||||
<td class=" "><?php echo $value->comments; ?></td>
|
||||
<?php if($value->from_date == "" && $value->to_date == "") { ?>
|
||||
<td class="">
|
||||
<?php echo dateFormat('d-m-Y',$value->perm_date);?><br>
|
||||
<?php echo timeFormat('h:i a', $value->from_time); ?> to
|
||||
<?php echo timeFormat('h:i a', $value->to_time);?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if($value->status == 'pending') { ?>
|
||||
<td class=" "> <?php echo dateFormat('d-m-Y',$value->from_date); echo ' to ';?>
|
||||
<?php echo dateFormat('d-m-Y',$value->to_date);?> </td>
|
||||
<?php } ?>
|
||||
|
||||
<a><i class="fa fa-check approveleave" data-toggle="modal" data-target=".bs-example-modal-sm" title="Approve Leave" id="<?php echo $value->id;?>"></i></a>
|
||||
<td class=" "><?php echo $type->type; ?></td>
|
||||
|
||||
|
||||
<a href="#"><i class="fa fa-times test" aria-hidden="true" title="Decline" onclick="showCustomPrompt()"
|
||||
id= "<?php echo $value->id; ?>"></i></a>
|
||||
<td class=" "><?php echo $value->Risedby; ?></td>
|
||||
<?php if($value->no_of_days == 0){ ?>
|
||||
<td class=" ">---</td>
|
||||
<?php } else { ?>
|
||||
<td class=""><?php echo $value->no_of_days; ?></td>
|
||||
<?php } ?>
|
||||
<?php if($value->status == 'pending'){ ?>
|
||||
<td style="color:#e68a00"><?php echo $value->status; ?></td>
|
||||
<?php }
|
||||
else if($value->status == 'Approved'){ ?>
|
||||
<td style="color:green"><?php echo $value->status; ?> By
|
||||
<?php echo $value->ApproveBy; ?><br><?php echo $value->approved_at; ?></td>
|
||||
<?php }
|
||||
else if($value->status == 'Declined'){ ?>
|
||||
<td style="color:red"><?php echo $value->status; ?> By
|
||||
<?php echo $value->DeclineBy; ?> <br>" <?php echo $value->DReason; ?> "</td>
|
||||
<?php }
|
||||
else if($value->status == 'canceled'){ ?>
|
||||
<td style="color:darkcyan;"><?php echo $value->status; ?></td>
|
||||
<?php }
|
||||
else{
|
||||
}?>
|
||||
<td style=" text-align: center; font-size: 16px;">
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($value->status == 'pending') { ?>
|
||||
|
||||
<a><i class="fa fa-check approveleave" data-toggle="modal"
|
||||
data-target=".bs-example-modal-sm" title="Approve Leave"
|
||||
id="<?php echo $value->id;?>"></i></a>
|
||||
|
||||
|
||||
<a href="#"><i class="fa fa-times test" aria-hidden="true" title="Decline"
|
||||
onclick="showCustomPrompt()" id="<?php echo $value->id; ?>"></i></a>
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="customPrompt" class="modal modal_default">
|
||||
<div class="modal-content modal-content_default">
|
||||
<span style="text-align: right;" onclick="$('#customPrompt').hide()"><i class="fa fa-times" aria-hidden="true"></i></span>
|
||||
<h3>Decline Reason</h3>
|
||||
<input list="browsers" onfocus id="decline_reason" required name="myBrowser" style="margin-top: 10%;padding: 10px;"/>
|
||||
<datalist id="browsers" >
|
||||
<?php foreach ($dropdown as $key => $value) { ?>
|
||||
<option value="<?php echo $value->enum_value; ?>"><?php echo $value->enum_value; ?></option>
|
||||
<?php } ?>
|
||||
</datalist>
|
||||
<div class="modal-content modal-content_default">
|
||||
<span style="text-align: right;" onclick="$('#customPrompt').hide()"><i class="fa fa-times"
|
||||
aria-hidden="true"></i></span>
|
||||
<h3>Decline Reason</h3>
|
||||
<input list="browsers" onfocus id="decline_reason" required name="myBrowser"
|
||||
style="margin-top: 10%;padding: 10px;" />
|
||||
<datalist id="browsers">
|
||||
<?php foreach ($dropdown as $key => $value) { ?>
|
||||
<option value="<?php echo $value->enum_value; ?>"><?php echo $value->enum_value; ?></option>
|
||||
<?php } ?>
|
||||
</datalist>
|
||||
|
||||
<button onclick="submitCustomPrompt()" type="button" class="btn btn-primary">Submit</button>
|
||||
|
||||
</div>
|
||||
<button onclick="submitCustomPrompt()" type="button" class="btn btn-primary">Submit</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br />
|
||||
|
||||
<!-- Large modal -->
|
||||
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg" hidden>Large modal</button> -->
|
||||
@ -160,103 +165,106 @@
|
||||
|
||||
<div style="display:none" id="sub-value">
|
||||
|
||||
<script>
|
||||
$('.approveleave').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
var url = "<?php echo base_url()?>Leave/ApproveLeave";
|
||||
<script>
|
||||
$('.approveleave').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
var url = "<?php echo base_url()?>Leave/ApproveLeave";
|
||||
|
||||
$.ajax({
|
||||
url: "<?php echo base_url()?>Leave/getDeleteConfirmationPopup",
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
$('#popup').html(JSON.parse(data));
|
||||
$('.delete_id').attr('value',id);
|
||||
$('.delete_url').attr('action',url);
|
||||
}
|
||||
$.ajax({
|
||||
url: "<?php echo base_url()?>Leave/getDeleteConfirmationPopup",
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
$('#popup').html(JSON.parse(data));
|
||||
$('.delete_id').attr('value', id);
|
||||
$('.delete_url').attr('action', url);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.bi-card-list',function(){
|
||||
var id = $(this).attr("id")
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "<?php echo base_url()?>Employee/view_emp_history/"+id,
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
console.log(response);
|
||||
$('.bs-example-modal-lg').html(response);
|
||||
$('.bs-example-modal-lg').modal("show");
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
$(document).on('click', '.bi-card-list', function() {
|
||||
var id = $(this).attr("id")
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "<?php echo base_url()?>Employee/view_emp_history/" + id,
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
console.log(response);
|
||||
$('.bs-example-modal-lg').html(response);
|
||||
$('.bs-example-modal-lg').modal("show");
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) {
|
||||
alert('text status ' + textStatus + ', err ' + err)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
function showCustomPrompt() {
|
||||
var customPrompt = document.getElementById("customPrompt");
|
||||
customPrompt.style.display = "block";
|
||||
}
|
||||
|
||||
function showCustomPrompt() {
|
||||
var customPrompt = document.getElementById("customPrompt");
|
||||
customPrompt.style.display = "block";
|
||||
}
|
||||
function submitCustomPrompt() {
|
||||
|
||||
function submitCustomPrompt() {
|
||||
|
||||
var id = $('.test').attr("id");
|
||||
var reason = document.getElementById("decline_reason").value;
|
||||
var id = $('.test').attr("id");
|
||||
var reason = document.getElementById("decline_reason").value;
|
||||
|
||||
if( reason != "")
|
||||
if (reason != "")
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
data:{id : id , reason : reason },
|
||||
url:"<?php echo base_url('Leave/Decline');?>",
|
||||
type:"get",
|
||||
success: function(response) {
|
||||
|
||||
window.location ='<?php echo base_url('Leave/leaveList');?>';
|
||||
}
|
||||
$.ajax({
|
||||
data: {
|
||||
id: id,
|
||||
reason: reason
|
||||
},
|
||||
url: "<?php echo base_url('Leave/Decline');?>",
|
||||
type: "get",
|
||||
success: function(response) {
|
||||
|
||||
window.location = '<?php echo base_url('Leave/leaveList');?>';
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
else
|
||||
});
|
||||
else
|
||||
|
||||
alert('Decline Reason is required');
|
||||
alert('Decline Reason is required');
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatables').DataTable({
|
||||
"order": [[0, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ 'excel', 'pdf'], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatables').DataTable({
|
||||
"order": [
|
||||
[0, 'desc']
|
||||
], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": ['excel', 'pdf'], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function showConfirmationPopup() {
|
||||
var popup = document.getElementById('confirmationPopup');
|
||||
popup.style.display = 'flex';
|
||||
}
|
||||
<script>
|
||||
function showConfirmationPopup() {
|
||||
var popup = document.getElementById('confirmationPopup');
|
||||
popup.style.display = 'flex';
|
||||
}
|
||||
|
||||
function hideConfirmationPopup() {
|
||||
var popup = document.getElementById('confirmationPopup');
|
||||
popup.style.display = 'none';
|
||||
}
|
||||
function hideConfirmationPopup() {
|
||||
var popup = document.getElementById('confirmationPopup');
|
||||
popup.style.display = 'none';
|
||||
}
|
||||
|
||||
function confirmAction() {
|
||||
// Handle the action to be performed on confirmation
|
||||
hideConfirmationPopup();
|
||||
// ...
|
||||
}
|
||||
|
||||
</script>
|
||||
function confirmAction() {
|
||||
// Handle the action to be performed on confirmation
|
||||
hideConfirmationPopup();
|
||||
// ...
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -270,6 +278,4 @@ function confirmAction() {
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -204,14 +204,15 @@ public function check_password()
|
||||
$table="users";
|
||||
$userData = $this->MY_Model->edit_option($data, user()->id, $table);
|
||||
// $this->session->sess_destroy();
|
||||
$data1['status'] = 'success';
|
||||
$data1['csrf_hash'] = $this->security->get_csrf_hash();
|
||||
echo json_encode($data1);
|
||||
// $data1['status'] = 'success';
|
||||
// $data1['csrf_hash'] = $this->security->get_csrf_hash();
|
||||
// echo json_encode($data1);
|
||||
redirect('logout');
|
||||
}
|
||||
else{
|
||||
$data['status'] = 'failed';
|
||||
$data['csrf_hash'] = $this->security->get_csrf_hash();
|
||||
echo json_encode($data);
|
||||
// $data['status'] = 'failed';
|
||||
// $data['csrf_hash'] = $this->security->get_csrf_hash();
|
||||
// echo json_encode($data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,4 +245,4 @@ public function view_business_history($id)
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,38 +1,40 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Add User</h3>
|
||||
</div>
|
||||
<div class="title_left">
|
||||
<h3>Add User</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title"> -->
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title"> -->
|
||||
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- <h6>General Information</h6> -->
|
||||
<!-- <div class="clearfix"></div> -->
|
||||
<!-- </div> -->
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>User/createUser" enctype="multipart/form-data">
|
||||
<!-- <h6>General Information</h6> -->
|
||||
<!-- <div class="clearfix"></div> -->
|
||||
<!-- </div> -->
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>User/createUser" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="text" id="created_by" name="created_by" value="<?php echo $data->created_by ?>" class="form-control " hidden>
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="text" id="created_by" name="created_by" value="<?php echo $data->created_by ?>"
|
||||
class="form-control " hidden>
|
||||
|
||||
|
||||
<!-- <?php if (is_superadmin()) { ?>
|
||||
<!-- <?php if (is_superadmin()) { ?>
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business<a style="color:red;">*</a> </label>
|
||||
@ -61,136 +63,158 @@
|
||||
|
||||
<?php } ?> -->
|
||||
|
||||
<?php if (is_superadmin()) { ?>
|
||||
<?php if (is_superadmin()) { ?>
|
||||
|
||||
<div class="item form-group">
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="business_id" name="business_id" required="required" class="form-control" >
|
||||
<option value="<?php if(isset($businessData)) { echo $businessData->uid; } ?>">
|
||||
<?php if(isset($businessData)) { echo $businessData->business_name; }else{ echo "Select business"; } ?>
|
||||
</option>
|
||||
<?php foreach ($business_dropdown as $key => $value) { ?>
|
||||
<option value="<?php echo $value->uid; ?>"><?php echo $value->business_name; echo $value->uid; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="business_id" name="business_id" required="required" class="form-control">
|
||||
<option value="<?php if(isset($businessData)) { echo $businessData->uid; } ?>">
|
||||
<?php if(isset($businessData)) { echo $businessData->business_name; }else{ echo "Select business"; } ?>
|
||||
</option>
|
||||
<?php foreach ($business_dropdown as $key => $value) { ?>
|
||||
<option value="<?php echo $value->uid; ?>">
|
||||
<?php echo $value->business_name; echo $value->uid; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Role<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="role" name="role" required="required" class="form-control" >
|
||||
<option value="">Select role</option>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="user">user</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Role<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="role" name="role" required="required" class="form-control">
|
||||
<option value="">Select role</option>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="user">user</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
else if (is_admin() || user()->action_permit != 'view') { ?>
|
||||
<div class="item form-group" hidden>
|
||||
<input type="text" id="business_id" name="business_id" value="<?php echo $data->business_id ?>" class="form-control " hidden>
|
||||
<input type="text" id="role" name="role" value="user" class="form-control " hidden>
|
||||
<div class="item form-group" hidden>
|
||||
<input type="text" id="business_id" name="business_id"
|
||||
value="<?php echo $data->business_id ?>" class="form-control " hidden>
|
||||
<input type="text" id="role" name="role" value="user" class="form-control " hidden>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <br /> <h6></h6> <div class="x_title"> </div> <br /> -->
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="" required="required"
|
||||
class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="email" id="email" name="email" value="" required="required"
|
||||
class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" id="mobile" name="mobile"
|
||||
value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Permission<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="action_permit" name="action_permit" required="required"
|
||||
class="form-control">
|
||||
<option value="">Select Permission</option>
|
||||
<option value="all">All</option>
|
||||
<option value="view">View</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<br />
|
||||
<h6></h6>
|
||||
<div class="x_title"> </div> <br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="user_name" name="user_name" value="" required="required"
|
||||
class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value=""
|
||||
required="required" class="form-control "
|
||||
title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password"
|
||||
class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password<a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value=""
|
||||
required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <br /> <h6></h6> <div class="x_title"> </div> <br /> -->
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="email" id="email" name="email" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" pattern="[6-9]{1}[0-9]{9}"
|
||||
title="Phone number with 6-9 and remaing 9 digit with 0-9" id="mobile" name="mobile" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Permission<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="action_permit" name="action_permit" required="required" class="form-control" >
|
||||
<option value="">Select Permission</option>
|
||||
<option value="all">All</option>
|
||||
<option value="view">View</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<br /> <h6></h6> <div class="x_title"> </div> <br />
|
||||
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Username<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="text" id="user_name" name="user_name" value="" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value="" required="required" class="form-control " title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-3 col-sm-3 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value="" required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
<!-- /Body page content -->
|
||||
@ -1,121 +1,119 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Change Password</h3>
|
||||
<div class="title_left">
|
||||
<h3>Change Password</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="change-pass" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>User/check_password" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Old Password <a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="old_password" name="old_password" value=""
|
||||
required="required" class="form-control ">
|
||||
<span id='message1'></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> New Password <a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value=""
|
||||
required="required" class="form-control "
|
||||
title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password"
|
||||
class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password <a
|
||||
style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value=""
|
||||
required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button type="reset" class="btn btn-primary" >Reset</button>
|
||||
<button type="submit" id="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- --------------------------- -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title"> -->
|
||||
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- <h6>General Information</h6> -->
|
||||
<!-- <div class="clearfix"></div> -->
|
||||
<!-- </div> -->
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="change-pass" data-parsley-validate class="form-horizontal form-label-left" method="post" action="" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Old Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="old_password" name="old_password" value="" required="required" class="form-control ">
|
||||
<span id='message1'></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> New Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="password" minlength="8" name="password" value="" required="required" class="form-control " title="password must have alphabets 
password requires 6 characters minimum">
|
||||
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Confirm Password </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="password" id="confirm_password" name="confirm_password" value="" required="required" class="form-control ">
|
||||
<span id='message'></span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="offset-md-8">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="" id="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
|
||||
<script>
|
||||
console.log($("#change-pass").serialize());
|
||||
$(document).on('click','#submit',function(){
|
||||
console.log($("#change-pass").serialize());
|
||||
$(document).on('click', '#submit', function() {
|
||||
var data = $("#change-pass").serialize();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>User/check_password",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
response = jQuery.parseJSON(response);
|
||||
if (response.status == "success") {
|
||||
console.log("ssssssssss");
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
location.href = "<?php echo base_url();?>Auth/logout";
|
||||
}
|
||||
else {
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#message1').html('Worng password').css('color', 'red');
|
||||
$('#password').val('');
|
||||
$('#confirm_password').val('');
|
||||
$('#message').html('');
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<?php echo base_url();?>User/check_password",
|
||||
data: data,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
response = jQuery.parseJSON(response);
|
||||
if (response.status == "success") {
|
||||
console.log("ssssssssss");
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
location.href = "<?php echo base_url();?>Auth/logout";
|
||||
} else {
|
||||
$('input[name=csrf_test_name]').val(response.csrf_hash);
|
||||
$('#message1').html('Worng password').css('color', 'red');
|
||||
$('#password').val('');
|
||||
$('#confirm_password').val('');
|
||||
$('#message').html('');
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) {
|
||||
alert('text status ' + textStatus + ', err ' + err)
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@ -1,65 +1,69 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Profile</h3>
|
||||
</div>
|
||||
<div class="title_left">
|
||||
<h3>Edit Profile</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title"> -->
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<!-- <div class="x_title"> -->
|
||||
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- <h6>General Information</h6> -->
|
||||
<!-- <div class="clearfix"></div> -->
|
||||
<!-- </div> -->
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>User/editprofiles" enctype="multipart/form-data">
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- <h6>General Information</h6> -->
|
||||
<!-- <div class="clearfix"></div> -->
|
||||
<!-- </div> -->
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>User/editprofiles" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $editData->id; ?>">
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $editData->id; ?>">
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="<?php echo $editData->name; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Name </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="name" name="name" value="<?php echo $editData->name; ?>"
|
||||
required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="email" name="email" value="<?php echo $editData->email; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name"> Email </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="email" name="email" value="<?php echo $editData->email; ?>"
|
||||
required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="mobile" name="mobile" value="<?php echo $editData->mobile; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Mobile </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="mobile" name="mobile" value="<?php echo $editData->mobile; ?>"
|
||||
required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<!-- <div class="item form-group">
|
||||
</div>
|
||||
<!-- --------------------------- -->
|
||||
<!-- <div class="item form-group">
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Profile </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
@ -67,21 +71,21 @@
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
<!-- --------------------------- -->
|
||||
<!-- --------------------------- -->
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="col-md-3 col-sm-3 offset-md-9">
|
||||
<button class="btn btn-primary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="col-md-3 col-sm-3 offset-md-9">
|
||||
<button class="btn btn-primary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -90,5 +94,5 @@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,13 +1,12 @@
|
||||
|
||||
<!-- page content -->
|
||||
<div class="" role="main">
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="title_left">
|
||||
<!-- page content -->
|
||||
<div class="" role="main">
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
<div class="title_left">
|
||||
<h3>User Profile</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title_right">
|
||||
<div class="title_right">
|
||||
<!-- <div class="col-md-5 col-sm-5 form-group pull-right top_search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
@ -16,101 +15,100 @@
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>User Details
|
||||
<!-- <small>Activity report</small> -->
|
||||
</h2>
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#">Settings 1</a>
|
||||
<a class="dropdown-item" href="#">Settings 2</a>
|
||||
</div>
|
||||
</li>
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
</ul> -->
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>User/editprofiles" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo user()->id; ?>">
|
||||
<button type="submit" class="btn btn-success" hidden>Update</button>
|
||||
<div class="x_title">
|
||||
<h2>User Details</h2>
|
||||
|
||||
<div class="col-md-3 col-sm-3 profile_left">
|
||||
<div class="profile_img">
|
||||
<div id="crop-avatar">
|
||||
<!-- Current avatar -->
|
||||
<?php
|
||||
if ($userData->profile_image == NULL) {
|
||||
?>
|
||||
<div class="profilepic">
|
||||
<img style="width: 100%;height: 100%; display: block;" src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file" hidden/>
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post"
|
||||
action="<?php echo base_url();?>User/editprofiles" enctype="multipart/form-data">
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>"
|
||||
value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo user()->id; ?>">
|
||||
<button type="submit" class="btn btn-success" hidden>Update</button>
|
||||
|
||||
<div class="col-md-3 col-sm-3 profile_left">
|
||||
<div class="profile_img">
|
||||
<div id="crop-avatar">
|
||||
<!-- Current avatar -->
|
||||
<?php
|
||||
if ($userData->profile_image == NULL) {
|
||||
?>
|
||||
<div class="profilepic">
|
||||
<img style="width: 100%;height: 100%; display: block;"
|
||||
src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg"
|
||||
alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file"
|
||||
hidden />
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera"
|
||||
style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="profilepic">
|
||||
<img class="profilepic__image" style="width: 100%; display: block;border-radius:50%" src="<?php echo base_url();?>/assets/uploads/profile_picture/<?php echo $userData->profile_image ?>" alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file" hidden/>
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<div class="profilepic">
|
||||
<img class="profilepic__image"
|
||||
style="width: 100%; display: block;border-radius:50%"
|
||||
src="<?php echo base_url();?>/assets/uploads/profile_picture/<?php echo $userData->profile_image ?>"
|
||||
alt="Avatar" title="Change the avatar">
|
||||
<input id="file_profile" name="profile_image" class="typeFile1" type="file"
|
||||
hidden />
|
||||
<div class="profilepic__content">
|
||||
<span class="profilepic__icon"><i class="fa fa-camera"
|
||||
style="font-size:25px;color:black"></i></span>
|
||||
<span class="profilepic__text"><b>Edit Profile</b></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<h3><?php echo user()->name ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<h3><?php echo user()->name ?></h3>
|
||||
|
||||
<ul class="list-unstyled user_data">
|
||||
<li><i class="fa fa-envelope user-profile-icon"></i> <?php echo user()->email ?>
|
||||
</li>
|
||||
<ul class="list-unstyled user_data">
|
||||
<li><i class="fa fa-envelope user-profile-icon"></i> <?php echo user()->email ?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="fa fa-phone user-profile-icon"></i> <?php echo user()->mobile ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
if (is_superadmin()) {
|
||||
?>
|
||||
<a class="btn btn-success" href="<?php echo base_url()?>User/editprofile/<?php echo md5(user()->id);?>"><i class="fa fa-edit m-right-xs"></i>Edit Profile</a>
|
||||
<br />
|
||||
<?php
|
||||
<li>
|
||||
<i class="fa fa-phone user-profile-icon"></i> <?php echo user()->mobile ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
if (is_superadmin()) {
|
||||
?>
|
||||
<a class="btn btn-success"
|
||||
href="<?php echo base_url()?>User/editprofile/<?php echo md5(user()->id);?>"><i
|
||||
class="fa fa-edit m-right-xs"></i>Edit Profile</a>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
|
||||
<!-- <script>
|
||||
|
||||
BIN
assets/appimg/default.ico
Normal file
BIN
assets/appimg/default.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 383 KiB |
100
composer.lock
generated
100
composer.lock
generated
@ -62,31 +62,34 @@
|
||||
},
|
||||
{
|
||||
"name": "chillerlan/php-qrcode",
|
||||
"version": "4.3.4",
|
||||
"version": "4.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/chillerlan/php-qrcode.git",
|
||||
"reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d"
|
||||
"reference": "52889cd7ab1b78e6a345edafe24aa74bc5becc08"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
|
||||
"reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/52889cd7ab1b78e6a345edafe24aa74bc5becc08",
|
||||
"reference": "52889cd7ab1b78e6a345edafe24aa74bc5becc08",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"chillerlan/php-settings-container": "^2.1.4",
|
||||
"chillerlan/php-settings-container": "^2.1.4 || ^3.1",
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phan/phan": "^5.3",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"setasign/fpdf": "^1.8.2"
|
||||
"phan/phan": "^5.4",
|
||||
"phpmd/phpmd": "^2.13",
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"setasign/fpdf": "^1.8.2",
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
"suggest": {
|
||||
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
|
||||
"setasign/fpdf": "Required to use the QR FPDF output."
|
||||
"setasign/fpdf": "Required to use the QR FPDF output.",
|
||||
"simple-icons/simple-icons": "SVG icons that you can use to embed as logos in the QR Code"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -113,7 +116,7 @@
|
||||
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A QR code generator. PHP 7.4+",
|
||||
"description": "A QR code generator with a user friendly API. PHP 7.4+",
|
||||
"homepage": "https://github.com/chillerlan/php-qrcode",
|
||||
"keywords": [
|
||||
"phpqrcode",
|
||||
@ -124,7 +127,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/chillerlan/php-qrcode/issues",
|
||||
"source": "https://github.com/chillerlan/php-qrcode/tree/4.3.4"
|
||||
"source": "https://github.com/chillerlan/php-qrcode/tree/4.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -136,29 +139,31 @@
|
||||
"type": "ko_fi"
|
||||
}
|
||||
],
|
||||
"time": "2022-07-25T09:12:45+00:00"
|
||||
"time": "2023-11-23T23:53:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "chillerlan/php-settings-container",
|
||||
"version": "2.1.4",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/chillerlan/php-settings-container.git",
|
||||
"reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a"
|
||||
"reference": "4d02944424fa1f48abca96353257c93cbac856c1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
|
||||
"reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/4d02944424fa1f48abca96353257c93cbac856c1",
|
||||
"reference": "4d02944424fa1f48abca96353257c93cbac856c1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.4 || ^8.0"
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phan/phan": "^5.3",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
"phan/phan": "^5.4",
|
||||
"phpmd/phpmd": "^2.13",
|
||||
"phpunit/phpunit": "^10.2",
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -177,10 +182,9 @@
|
||||
"homepage": "https://github.com/codemasher"
|
||||
}
|
||||
],
|
||||
"description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+",
|
||||
"description": "A container class for immutable settings objects. Not a DI container.",
|
||||
"homepage": "https://github.com/chillerlan/php-settings-container",
|
||||
"keywords": [
|
||||
"PHP7",
|
||||
"Settings",
|
||||
"configuration",
|
||||
"container",
|
||||
@ -200,20 +204,20 @@
|
||||
"type": "ko_fi"
|
||||
}
|
||||
],
|
||||
"time": "2022-07-05T22:32:14+00:00"
|
||||
"time": "2023-07-17T20:46:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dasprid/enum",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DASPRiD/Enum.git",
|
||||
"reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f"
|
||||
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8e6b6ea76eabbf19ea2bf5b67b98e1860474012f",
|
||||
"reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f",
|
||||
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016",
|
||||
"reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -248,27 +252,27 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/DASPRiD/Enum/issues",
|
||||
"source": "https://github.com/DASPRiD/Enum/tree/1.0.4"
|
||||
"source": "https://github.com/DASPRiD/Enum/tree/1.0.5"
|
||||
},
|
||||
"time": "2023-03-01T18:44:03+00:00"
|
||||
"time": "2023-08-25T16:18:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "endroid/qr-code",
|
||||
"version": "4.8.2",
|
||||
"version": "4.8.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/endroid/qr-code.git",
|
||||
"reference": "2436c2333a3931c95e2b96eb82f16f53143d6bba"
|
||||
"reference": "0db25b506a8411a5e1644ebaa67123a6eb7b6a77"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/endroid/qr-code/zipball/2436c2333a3931c95e2b96eb82f16f53143d6bba",
|
||||
"reference": "2436c2333a3931c95e2b96eb82f16f53143d6bba",
|
||||
"url": "https://api.github.com/repos/endroid/qr-code/zipball/0db25b506a8411a5e1644ebaa67123a6eb7b6a77",
|
||||
"reference": "0db25b506a8411a5e1644ebaa67123a6eb7b6a77",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"bacon/bacon-qr-code": "^2.0.5",
|
||||
"php": "^8.0"
|
||||
"php": "^8.1"
|
||||
},
|
||||
"conflict": {
|
||||
"khanamiryan/qrcode-detector-decoder": "^1.0.6"
|
||||
@ -317,7 +321,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/endroid/qr-code/issues",
|
||||
"source": "https://github.com/endroid/qr-code/tree/4.8.2"
|
||||
"source": "https://github.com/endroid/qr-code/tree/4.8.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -325,20 +329,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-30T18:46:02+00:00"
|
||||
"time": "2023-09-29T14:03:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.15.2",
|
||||
"version": "2.15.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73"
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
|
||||
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -388,7 +392,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/filp/whoops/issues",
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.2"
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -396,7 +400,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-12T12:00:00+00:00"
|
||||
"time": "2023-11-03T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@ -1626,16 +1630,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.27.0",
|
||||
"version": "v1.28.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
|
||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
||||
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1650,7 +1654,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@ -1688,7 +1692,7 @@
|
||||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1704,7 +1708,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-11-03T14:55:06+00:00"
|
||||
"time": "2023-01-26T09:26:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
|
||||
2064
sql/venbaehn_ams_2023-12-18_10-33-43.sql
Normal file
2064
sql/venbaehn_ams_2023-12-18_10-33-43.sql
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user