?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Settings/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Settings/edit_user.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script> function Loaduserpermission(user_id) { $('#PermissionDiv').load("<?php echo site_url('settings/ListUserPermissionByuserIdControler/'); ?>" +"/" + user_id); } $(document).ready( function() { Loaduserpermission("<?php echo $userdetails->id ?>"); }); function FillValues1(empid,empname,desg,employee) { /* FUNCTION TO GET VALUES FROM PICK EMPLOYEE COLOR BOX AND FILL THE VALUES IN THE TEXT BOXES. */ desg= desg.replace(/ /g,"~"); desg= desg.replace(/\//g,"_"); $.ajax({ type: "POST", url: "<?php echo site_url('settings/GetRolefromCid/'); ?>" +"/" + desg +"/" + empid, success: function(msg){ if(msg==1) { alert('Profile not set for User Designation'); } else if(msg == 2) { alert('Staff already assigned to user'); } else { document.getElementById('EmpId').value=empid; document.getElementById('EmpName').value=empname; document.getElementById('uname').value=employee; document.getElementById('roles').value=desg; $("#PermissionDiv").val(msg); } } }) $.fn.colorbox.close(); } </script> <?php $attributes = array('id' => 'UpdateUserForm','class'=>'customForm'); echo form_open('settings/UpdateUsersControler',$attributes); ?> <div style="width:25%;float:left"> <fieldset class="lefttalign"><legend>Edit User</legend> <ul> <li> <?php echo form_input(array('type'=>'hidden','name'=>'uid','id'=>'uid','value'=>$userdetails->id)) ?> </li> <li> <label>Staff </label> <?php $staffname=$this->settingsmodel->getSingleFieldValue('staffpersonaldetails','name','id',$userdetails->staff_id);?> <?php echo form_input(array('name'=>'EmpName','readonly'=>'readonly','id'=>'EmpName','value'=>$staffname)) ?> <input type="hidden" name="EmpId" id="EmpId" value="<?php echo $userdetails->staff_id; ?>"/> <input type="button" value="pick" class='pickEmp' onclick="showEmpPick()" /> </li> <li> <label>User Name </label> <?php echo form_input(array('name'=>'uname','readonly'=>'readonly','id'=>'uname','value'=>$userdetails->username)) ?> </li> <!--<li> <label>New Password </label> <?php //echo form_password(array('name'=>'pword','id'=>'pword')) ?> </li> <li> <label>Re-Type Password </label> <?php //echo form_password(array('name'=>'repassword','id'=>'repassword','onblur'=>'ValidatePassword()')) ?> </li>--> <li> <label>User Profile </label> <?php $rolename=$this->settingsmodel->getSingleFieldValue('user_roles','name','id',$userdetails->role_id); $name=$this->settingsmodel->getSingleFieldValue('designation','designation','id',$rolename); // echo "<select name='role' id='role' onchange='ListSelectedRole(this.value)'>"; // echo "<option value='". $userdetails->role_id . "' >". $rolename ."</option>"; // // $role=$this->settingsmodel->getrolelist(); // if (count($role)) // { // foreach ($role as $key => $list) // { // echo "<option value='". $list['id'] . "'>" . $list['name'] . "</option>"; // } // echo "</select>"; // } ?> <input type="text" readonly name="roles" id="roles" value="<?=$name?>"/> </li> </ul> <ul> <li> <input type="submit" onclick="Update_User()" value="Update User" /> </li> </ul> </fieldset> </div> <div id="PermissionDiv" style="width:74%;float:left;"></div> <?php echo form_close(); ?> <div id="backgrounddiv"></div> <div style='display:none'> <div id='PickEmployee' style='padding:10px; background:#fff;'> <?php $this->load->view('Customer/pickemployee');?> </div> </div>