policybot/application/views/admin/staff/add.php
2021-11-30 16:26:55 +05:30

135 lines
5.4 KiB
PHP

<link href="<?=base_url();?>bassets/select2/css/select2.css" rel="stylesheet" type="text/css" />
<link href="<?=base_url();?>bassets/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
<?php $this->load->view('admin/includes/header');?>
<div class="page-container">
<?php $this->load->view('admin/includes/sidebar');?>
<!-- start page content -->
<div class="page-content-wrapper">
<div class="page-content">
<div class="page-bar">
<div class="page-title-breadcrumb">
<div class=" pull-left">
<div class="page-title">Staff Add</div>
</div>
<ol class="breadcrumb page-breadcrumb pull-right">
<li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.html">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li><a class="parent-item" href="<?=base_url();?>admin/Staff">Staff</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li class="active">Staff Add</li>
</ol>
</div>
</div>
<?php $this->load->view('admin/includes/msg');?>
<div class="row">
<div class="col-md-12">
<div class="card card-topline-orange">
<div class="white-box">
<div class="card card-box">
<div class="card-head">
<header>Add Staff</header>
</div>
<div class="card-body ">
<?=form_open_multipart(base_url().'admin/add-staff');?>
<div class="row">
<div class="form-group col-md-6">
<label for="simpleFormEmail"> Name <span class="required">*</span></label>
<input type="text" name="Name" autocomplete="off" class="form-control" data-validation="required" placeholder="Name">
</div>
<div class="form-group col-md-6">
<label for="simpleFormEmail"> Role <span class="required">*</span></label>
<select name="Role" autocomplete="off" class="select2 form-control" data-validation="required" placeholder="Role">
<?php if(isset($role)&& $role->num_rows()>0)
{ foreach($role->result() as $r)
{ $id=$r->id;
$name=$r->name;
?>
<option value="<?=$id;?>" ><?=$name;?></option> <?php }} ?>
</select>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="simpleFormEmail"> Mobile <span class="required">*</span></label>
<input type="text" name="Mobile" autocomplete="off" class="form-control" data-validation="number length" data-validation-length="10" placeholder="Mobile">
</div>
<div class="form-group col-md-6">
<label for="simpleFormEmail"> Email <span class="required">*</span></label>
<input type="text" name="Email" autocomplete="off" class="form-control" data-validation="required" placeholder="Email">
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="checkbox checkbox-orange">
<input id="checkboxbg4" type="checkbox" name="loginvalue" >
<label for="checkboxbg4" style="font-weight:900;color:#ef7f1a;">
Give login credentials
</label>
</div>
</div>
</div>
<div id="logindiv" style="display:none">
<div class="row" >
<div class="form-group col-md-6">
<label for="simpleFormEmail"> username <span class="required">*</span></label>
<input type="text" name="username" autocomplete="off" class="form-control" data-validation="required" placeholder="Username">
</div>
<div class="form-group col-md-6">
<label for="simpleFormEmail"> password <span class="required">*</span></label>
<input type="password" name="password" autocomplete="off" class="form-control" data-validation="required" placeholder="Password">
</div>
</div>
</div>
<input type="submit" name="addstaff" class="btn btn-primary" value="Submit">
<?=form_close();?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--modal -->
<div class="modal fade" id="rolepop" tabindex="-1" role="basic" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="viewdetails">
<img src="<?=base_url();?>bassets/admin/img/process.gif" class="loader-img">
</div>
</div>
</div>
</div>
<?php $this->load->view('admin/includes/footer');?>
<script type="text/javascript" src="<?=base_url();?>bassets/admin/js/jquery.cookie.min.js"></script>
<!--select2-->
<script src="<?=base_url();?>bassets/select2/js/select2.js"></script>
<script src="<?=base_url();?>bassets/select2/js/select2-init.js"></script>
<script>
var base_path=$('body').attr('data-path');
$('input[type="checkbox"]').click(function(){
if($(this).prop("checked") == true){
$("#checkboxbg4").val(1);
$("#logindiv").css("display","block");
}
else if($(this).prop("checked") == false){
$("#checkboxbg4").val(0);
$("#logindiv").css("display","none");
}
});
</script>