* code for task #48840.

This commit is contained in:
王怡栋
2022-02-15 09:42:47 +08:00
parent a2ce091868
commit 98c6d7b2b1
14 changed files with 57 additions and 13 deletions
+5 -2
View File
@@ -49,6 +49,7 @@
<th class='c-dept<?php echo zget($visibleFields, 'dept', ' hidden') . zget($requiredFields, 'dept', '', ' required');?>'> <?php echo $lang->user->dept;?></th>
<th class='accountThWidth required'><?php echo $lang->user->account;?></th>
<th class='c-realname required'><?php echo $lang->user->realname;?></th>
<th class='c-visions required'><?php echo $lang->user->visions;?></th>
<th class='c-role<?php echo zget($requiredFields, 'role', '', ' required')?>'><?php echo $lang->user->role;?></th>
<th class='c-group'><?php echo $lang->user->group;?></th>
<th class='<?php echo zget($visibleFields, 'email', "$minWidth hidden", $minWidth) . zget($requiredFields, 'email', '', ' required')?>'><?php echo $lang->user->email;?></th>
@@ -71,13 +72,15 @@
<tbody>
<?php $depts = $depts + array('ditto' => $lang->user->ditto)?>
<?php $lang->user->roleList = $lang->user->roleList + array('ditto' => $lang->user->ditto)?>
<?php $groupList = $groupList + array('ditto' => $lang->user->ditto)?>
<?php $groupList = $groupList + array('ditto' => $lang->user->ditto);?>
<?php $visionList = $this->user->getVisionList() + array('ditto' => $lang->user->ditto);?>
<?php for($i = 0; $i < $config->user->batchCreate; $i++):?>
<tr class='text-center'>
<td><?php echo $i+1;?></td>
<td><?php echo $i + 1;?></td>
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i > 0 ? 'ditto' : $deptID, "class='form-control chosen'");?></td>
<td><?php echo html::input("account[$i]", '', "class='form-control account_$i' onchange='changeEmail($i)'");?></td>
<td><?php echo html::input("realname[$i]", '', "class='form-control'");?></td>
<td class='text-left'><?php echo html::select("visions[$i][]", $visionList, $i > 0 ? 'ditto' : '', "class='form-control chosen' multiple");?></td>
<td><?php echo html::select("role[$i]", $lang->user->roleList, $i > 0 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("group[$i]", $groupList, $i > 0 ? 'ditto' : '', "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'email', "class='hidden'")?>><?php echo html::input("email[$i]", '', "class='form-control email_$i' onchange='setDefaultEmail($i)'");?></td>
+6 -3
View File
@@ -44,10 +44,11 @@
<table class="table table-form">
<thead>
<tr class='text-center'>
<th class='w-30px'><?php echo $lang->idAB;?></th>
<th class='w-30px'><?php echo $lang->idAB;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'> <?php echo $lang->user->dept;?></th>
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->account;?></th>
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->realname;?></th>
<th class='w-130px'><?php echo $lang->user->visions;?></th>
<th class='w-120px'><?php echo $lang->user->role;?></th>
<th class='w-120px'><?php echo $lang->user->type;?></th>
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
@@ -71,8 +72,8 @@
<?php $first = true;?>
<?php foreach($users as $user):?>
<?php
$dept = ($first and empty($user->dept)) ? 0 : (empty($user->dept) ? 'ditto' : $user->dept);
$role = ($first and empty($user->role)) ? 0 : (empty($user->role) ? 'ditto' : $user->role);
$dept = ($first and empty($user->dept)) ? 0 : (empty($user->dept) ? 'ditto' : $user->dept);
$role = ($first and empty($user->role)) ? 0 : (empty($user->role) ? 'ditto' : $user->role);
$type = empty($user->type) ? 'inside' : $user->type;
$first = false;
?>
@@ -81,6 +82,8 @@
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$user->id]", $depts, $dept, "class='form-control chosen'");?></td>
<td><?php echo html::input("account[$user->id]", $user->account, "class='form-control'");?></td>
<td><?php echo html::input("realname[$user->id]", $user->realname, "class='form-control'");?></td>
<?php $visionList = $this->user->getVisionList();?>
<td class='text-left'><?php echo html::select("visions[$user->id][]", $visionList, $user->visions, "class='form-control chosen' multiple");?></td>
<td><?php echo html::select("role[$user->id]", $lang->user->roleList, $role, "class='form-control'");?></td>
<td><?php echo html::select("type[$user->id]", $lang->user->typeList, $type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'commiter', 'hidden')?>'><?php echo html::input("commiter[$user->id]", $user->commiter, "class='form-control'");?></td>
+5
View File
@@ -60,6 +60,11 @@
<th><?php echo $lang->user->password2;?></th>
<td><?php echo html::password('password2', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->user->visions;?></th>
<?php $visionList = $this->user->getVisionList();?>
<td><?php echo html::checkbox('visions', $visionList, key($visionList), "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->user->realname;?></th>
<td><?php echo html::input('realname', '', "class='form-control'");?></td>
+3
View File
@@ -81,6 +81,9 @@
<tr>
<th><?php echo $lang->user->commiter;?></th>
<td><?php echo html::input('commiter', $user->commiter, "class='form-control'");?></td>
<th><?php echo $lang->user->visions;?></th>
<?php $visionList = $this->user->getVisionList();?>
<td><?php echo html::select('visions[]', $visionList, $user->visions, "class='form-control chosen' multiple");?></td>
</tr>
</table>
<table align='center' class='table table-form'>