* Finish task #44216.
This commit is contained in:
+3
-13
@@ -402,18 +402,6 @@ class storyModel extends model
|
||||
public function batchCreate($productID = 0, $branch = 0, $type = 'story')
|
||||
{
|
||||
$forceReview = $this->checkForceReview();
|
||||
foreach($_POST['needReview'] as $index => $value)
|
||||
{
|
||||
if($_POST['title'][$index] and isset($_POST['reviewer'][$index])) $_POST['reviewer'][$index] = array_filter($_POST['reviewer'][$index]);
|
||||
if($_POST['title'][$index] and empty($_POST['reviewer'][$index]))
|
||||
{
|
||||
if($value || $forceReview)
|
||||
{
|
||||
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('action');
|
||||
$branch = (int)$branch;
|
||||
@@ -440,6 +428,8 @@ class storyModel extends model
|
||||
$stories->plan[$i] = $plan;
|
||||
$stories->pri[$i] = (int)$pri;
|
||||
$stories->source[$i] = $source;
|
||||
|
||||
if(isset($stories->reviewer[$i])) $stories->reviewer[$i] = array_filter($stories->reviewer[$i]);
|
||||
}
|
||||
|
||||
if(isset($stories->uploadImage)) $this->loadModel('file');
|
||||
@@ -460,7 +450,7 @@ class storyModel extends model
|
||||
$story->category = $stories->category[$i];
|
||||
$story->pri = $stories->pri[$i];
|
||||
$story->estimate = $stories->estimate[$i];
|
||||
$story->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft';
|
||||
$story->status = (empty($stories->reviewer[$i]) and !$forceReview) ? 'active' : 'draft';
|
||||
$story->stage = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? 'projected' : 'wait';
|
||||
$story->keywords = $stories->keywords[$i];
|
||||
$story->sourceNote = $stories->sourceNote[$i];
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
<th class='c-category'><?php echo $lang->story->category;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->story->pri;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->story->estimate;?></th>
|
||||
<th class='c-review<?php echo zget($visibleFields, 'review', ' hidden') . zget($requiredFields, 'review', '', ' required');?>'><?php echo $lang->story->needReview;?></th>
|
||||
<th class='<?php echo zget($visibleFields, 'review', ' hidden');?>' style="width: 200px !important"><?php echo $lang->story->reviewedBy;?></th>
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->story->keywords;?></th>
|
||||
<?php
|
||||
@@ -98,9 +97,7 @@
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select('category[$id]', $lang->story->categoryList, 'feature', "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select('pri[$id]', $priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', 'hidden')?>'><?php echo html::input('estimate[$id]', $estimate, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('needReview[$id]', $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<?php $isDisabled = $needReview ? '' : 'disabled';?>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('reviewer[$id][]', $users, '', "class='form-control chosen' multiple $isDisabled");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('reviewer[$id][]', $users, '', "class='form-control chosen' multiple");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input('keywords[$id]', '', "class='form-control'");?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . '[$id]') . "</td>";?>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user