HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //var/www/html/pmw24/pmw_live_testing/app/application/views/admin/usersetting/detail.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>
            Edit User 
            
          </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="<?php echo base_url('admin/usersetting');?>">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/update');?>" 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="required">
								<option value="">Select</option>	
							  <?php foreach($roles as $role){?>
								<option value="<?php echo $role['role_id'];?>" <?php if($role['role_id'] == $cms['role_id']){echo "selected";}?>><?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 $cms['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 $cms['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 $cms['employee_id'];?>" placeholder="Employee Id" required="required">
							  <?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 $cms['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="org_password" name="org_password" value="<?php echo $cms['org_password'];?>" placeholder="Email" 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 $cms['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="Start Date" id="dob" name="dob" value="<?php echo $cms['dob']; ?>"/>
									<span class="input-group-addon">
										<span class="glyphicon glyphicon-calendar"></span>
									</span>
								</div>
							</div>
							<div class="form-group">
							  <label for="address">Unit/No</label>
							  <input type="text" class="form-control" id="unit" name="unit" value="<?php echo $cms['unit'];?>" placeholder="Unit/No">
							  <?php echo form_error('unitno','<span class="error">', '</span>'); ?>
							</div>
							<div class="form-group">
							  <label for="address">Street</label>
							  <input type="text" class="form-control" id="street" name="street" value="<?php echo $cms['street'];?>" placeholder="Street">
							  <?php echo form_error('street','<span class="error">', '</span>'); ?>
							</div>
							<div class="form-group">
							  <label for="address">Suburb</label>
							  <input type="text" class="form-control" id="suburb" name="suburb" value="<?php echo $cms['suburb'];?>" placeholder="Suburb">
							  <?php echo form_error('suburb','<span class="error">', '</span>'); ?>
							</div>
							
							<div class="form-group">
							  <label for="address">PostCode<sup class="superr">*</sup></label>
							  <input type="text" class="form-control" id="post_code" name="post_code" value="<?php echo $cms['post_code'];?>" placeholder="Post code">
							  <?php echo form_error('p','<span class="error">', '</span>'); ?>
							</div>
							<div class="form-group">
							  <label for="address">Address</label>
							  <input type="text" class="form-control" id="address" name="address" value="<?php echo $cms['address'];?>" placeholder="Address" value="<?php echo $cms['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 $cms['emergency_contact'];?>" 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 $cms['tfn'];?>" placeholder="TFN">
							  <?php echo form_error('tfn','<span class="error">', '</span>'); ?>
							</div>
							<div class="form-group">
							  <label for="abn">ABN</label>
							  <input type="text" class="form-control" id="abn" name="abn" value="<?php echo $cms['abn'];?>" placeholder="ABN">
							  <?php //echo form_error('abn','<span class="error">', '</span>'); ?>
							</div>
						  </div>
						  <!-- /.box-body -->
						  <div class="box-footer">	
							<input type="hidden" id="admin_id" name="admin_id" value="<?php echo $cms['admin_id']; ?>">
							<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",
						//phoneno: {required:true,number: true},
						phoneno: {required:true,number: true, minlength:10,maxlength:15}, 
						//abn: "required",
						emergency_contact_no:{number: true},
						post_code:{required: true,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"},
						//phoneno:{required:"Phone No field is required"}, 
						phoneno:{required:"Phone No field is required",minlength:"Min length is 10 digit",maxlength:"Max length is 15 digit"},
						post_code:{required:"Post code 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: 'dd/mm/yyyy'
});
</script>