File: //var/www/html/pmw24/OLD_Root_BAK/application/views/admin/usersetting/add_05_11_18.php
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script src="<?php echo base_url()?>/public/validation/js/jquery.validate.js"></script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h3>
User Settings
</h3>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- general form elements -->
<div class="col-md-12">
<div class="box box-primary">
<div class="admin-tab-wrapper">
<div class="admin_tab">
<!--<button class="btn btn-primary dropdown-toggle btn-algnmt" type="button" data-toggle="dropdown">Action
<span class="caret"></span></button>-->
<ul>
<li><a href="javascript:void(0);" onclick="window.history.back();">Back</a></li>
</ul>
</div>
</div>
<div class="box-header with-border">
<h3 class="box-title"></h3>
<?php if($this->session->flashdata('error_msg')){?>
<div class="alert alert-warning alert-dismissible hite" style="height:60px;">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<h4><i class="icon fa fa-warning"></i><?php echo $this->session->flashdata('error_msg'); ?></h4>
</div>
<?php }?>
<?php if($this->session->flashdata('success_msg')){?>
<div class="alert alert-success alert-dismissible hite" style="height:60px;">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<h4><i class="icon fa fa-warning"></i><?php echo $this->session->flashdata('success_msg'); ?></h4>
</div>
<?php }?>
</div>
<!-- /.box-header -->
<!-- form start -->
<form id="signupForm" role="form" class="mtbresize" method="post" action="<?php echo base_url('admin/usersetting/contenta');?>" enctype="multipart/form-data" autocomplete="off">
<div class="box-body">
<div class="form-group">
<label for="role_id">Role Name<sup class="superr">*</sup></label>
<select class="form-control" id="role_id" name="role_id" required>
<option value=" ">Select</option>
<?php foreach($roles as $role){?>
<option value="<?php echo $role['role_id'];?>"><?php echo $role['role_name'];?></option>
<?php } ?>
</select>
<?php echo form_error('role_id','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="first_name">First Name<sup class="superr">*</sup></label>
<input type="text" class="form-control" id="first_name" name="first_name" value="<?php echo set_value('first_name');?>" placeholder="First Name" required="required">
<?php echo form_error('first_name','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="last_name">Last Name</label>
<input type="text" class="form-control" id="last_name" name="last_name" value="<?php echo set_value('last_name');?>" placeholder="Last Name">
<?php echo form_error('last_name','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="employee_id">Employee Id</label>
<input type="text" class="form-control" id="employee_id" name="employee_id" value="<?php echo set_value('employee_id');?>" placeholder="Employee Id">
<?php echo form_error('employee_id','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="email">Email<sup class="superr">*</sup></label>
<input type="email" class="form-control" id="email" name="email" value="<?php echo set_value('email');?>" placeholder="Email" required="required">
<?php echo form_error('email','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="password">Password<sup class="superr">*</sup></label>
<input type="password" class="form-control" id="password" name="password" value="<?php echo set_value('password');?>" placeholder="Password" required="required">
<?php echo form_error('password','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="phoneno">Mobile No<sup class="superr">*</sup></label>
<input type="text" class="form-control" id="phoneno" name="phoneno" value="<?php echo set_value('phoneno');?>" placeholder="Mobile" required="required">
<?php echo form_error('phoneno','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="dob">Date Of Birth</label>
<div class='input-group date'>
<input type='text' class="form-control" placeholder="Date Of Birth" id="dob" name="dob" value="<?php echo set_value('dob');?>"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="form-group">
<label for="address">Address</label>
<input type="text" class="form-control" id="address" name="address" value="<?php echo set_value('address');?>" placeholder="Address">
<?php echo form_error('address','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="emergency_contact_no">Emergency Contact No</label>
<input type="text" class="form-control" id="emergency_contact_no" name="emergency_contact_no" value="<?php echo set_value('emergency_contact_no');?>" placeholder="Emergency Contact No">
<?php echo form_error('emergency_contact_no','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="tfn">TFN</label>
<input type="text" class="form-control" id="tfn" name="tfn" value="<?php echo set_value('tfn');?>" placeholder="TFN">
<?php echo form_error('tfn','<span class="error">', '</span>'); ?>
</div>
<div class="form-group">
<label for="abn">ABN<sup class="superr">*</sup></label>
<input type="text" class="form-control" id="phoneno" name="abn" value="<?php echo set_value('abn');?>" placeholder="ABN" required="required">
<?php echo form_error('abn','<span class="error">', '</span>'); ?>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<button type="submit" class="btn btn-sm btn-primary">Submit</button>
</div>
</form>
</div>
</div>
<!-- /.box -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-show-password/1.0.3/bootstrap-show-password.min.js"></script>
<script>
$( "#signupForm" ).validate( {
rules: {
role_id: "required",
first_name: "required",
email:"required",
password:"required",
phoneno: {required:true,number: true},
abn: "required",
emergency_contact_no:{number: true}
},
messages: {
role_id: {required:"Role Name field is required"},
first_name:{required:"First Name field is required"},
email:{required:"Email field is required"},
password:{required:"Password field is required"},
phoneno:{required:"Phone No field is required"},
abn:{required:"ABN field is required"}
},
errorElement: "em",
highlight: function ( element, errorClass, validClass ) {
$( element ).parents( ".form-control" ).addClass( "has-error" ).removeClass( "has-success" );
},
unhighlight: function (element, errorClass, validClass) {
$( element ).parents( ".form-control" ).addClass( "has-success" ).removeClass( "has-error" );
}
} );
var nowDate = new Date();
var today = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), 0, 0, 0, 0);
$('#dob').datepicker({
endDate:today,
format: 'yyyy-mm-dd'
});
</script>