Merge branch 'pailei_sj_50431' into 'pailei2'

fix bug #50431

See merge request easycorp/zentaopms!2214
This commit is contained in:
孙广明
2022-03-14 06:20:37 +00:00
2 changed files with 4 additions and 10 deletions
+3 -9
View File
@@ -448,18 +448,12 @@ class executionModel extends model
}
$products = array_filter($this->post->products);
if($oldExecution->type == 'stage' and empty($products))
$noLinkTip = $oldExecution->type != 'kanban' ? $this->lang->execution->noLinkProduct : $this->lang->execution->kanbanNoLinkProduct;
if(empty($products))
{
dao::$errors['message'][] = $this->lang->execution->noLinkProduct;
dao::$errors['message'][] = $noLinkTip;
return false;
}
if($oldExecution->type == 'kanban' and empty($products))
{
dao::$errors['message'][] = $this->lang->execution->kanbanNoLinkProduct;
return false;
}
/* Get the data from the post. */
$execution = fixer::input('post')
->setDefault('lastEditedBy', $this->app->user->account)
+1 -1
View File
@@ -159,7 +159,7 @@
<?php endforeach;?>
<div class='col-sm-4'>
<div class="input-group">
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' required onchange='loadBranches(this)'");?>
<span class='input-group-addon fix-border'></span>
</div>
</div>