* Finish task#8102.

This commit is contained in:
leiyong
2020-10-10 14:51:27 +08:00
parent 5c81e807ce
commit d29da8f33d
6 changed files with 13 additions and 15 deletions
+4 -1
View File
@@ -254,8 +254,10 @@ class programModel extends model
{
/* Child program begin cannot less than parent. */
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin);
/* When parent set end then child program end cannot greater than parent. */
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
/* When parent set end then child program cannot set longTime. */
if(empty($program->end) and $this->post->longTime and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
@@ -289,9 +291,10 @@ class programModel extends model
->where('t1.account')->eq($this->app->user->account)
->andWhere('t2.role')->eq('PRJadmin')
->fetch();
if(!empty($groupPriv))
{
$newProgram = $groupPriv->program . ",$programID";
$newProgram = $groupPriv->PRJ . ",$programID";
$this->dao->update(TABLE_USERGROUP)->set('PRJ')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec();
}
else
-4
View File
@@ -99,10 +99,6 @@
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->program->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->program->PGMAuthList, 'extend', '', 'block');?></td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->program->PGMAclList, 'open', "onclick='setWhite(this.value);'", 'block'));?></td>
-4
View File
@@ -68,10 +68,6 @@
<?php echo html::textarea('desc', $program->desc, "rows='6' class='form-control kindeditor' hidefocus='true'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->program->auth;?></th>
<td colspan='3'><?php echo html::radio('auth', $lang->program->PGMAuthList, $program->auth, '', 'block');?></td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->program->PGMAclList, $program->acl, "onclick='setWhite(this.value);'", 'block'));?></td>