*Add the user add, edit, and view the details of the page without the
*date of hire display
This commit is contained in:
@@ -10,3 +10,7 @@ function changeGroup(role)
|
||||
}
|
||||
$('#group').trigger("chosen:updated");
|
||||
}
|
||||
/*
|
||||
设置用户的入职日期,默认为当天
|
||||
*/
|
||||
document.getElementById('join').value = new Date().format("yyyy-MM-dd");
|
||||
|
||||
@@ -210,7 +210,7 @@ class userModel extends model
|
||||
if(strtolower($_POST['account']) == 'guest') return false;
|
||||
|
||||
$user = fixer::input('post')
|
||||
->setDefault('join', '0000-00-00')
|
||||
->setDefault('join', $this->post->join)
|
||||
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
|
||||
->setIF($this->post->password1 == false, 'password', '')
|
||||
->setIF($this->post->email != false, 'email', trim($this->post->email))
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
<th><?php echo $lang->user->password2;?></th>
|
||||
<td><?php echo html::password('password2', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<td><input type="date" name="join" id="join" class="form-control" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->role;?></th>
|
||||
<td><?php echo html::select('role', $lang->user->roleList, '', "class='form-control' onchange='changeGroup(this.value)'");?></td>
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
<th><?php echo $lang->user->role;?></th>
|
||||
<td><?php echo html::select('role', $lang->user->roleList, $user->role, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<td><input type="date" name="join" value="<?php echo $user->join;?>" class="form-control"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->priv;?></th>
|
||||
<td colspan='3'><?php echo html::select('groups[]', $groups, $userGroups, 'size=3 multiple=multiple class="form-control chosen"');?></td>
|
||||
|
||||
Reference in New Issue
Block a user