* Fix bug#26804,26797.

This commit is contained in:
xieqiyu
2022-08-24 22:43:27 +08:00
parent b2becfb0ec
commit 14ce3c97f9
5 changed files with 88 additions and 41 deletions
@@ -85,7 +85,8 @@
<tfoot>
<tr>
<td colspan="7" class="text-center form-actions">
<?php echo html::submitButton($lang->save);?>
<?php echo html::commonButton($lang->save, "id='saveButton'", 'btn btn-primary btn-wide');?>
<?php echo html::commonButton($lang->story->saveDraft, "id='saveDraftButton'", 'btn btn-secondary btn-wide');?>
<?php echo html::backButton();?>
</td>
</tr>
+18 -20
View File
@@ -24,13 +24,21 @@
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->story->create;?></h2>
<?php if(!$this->story->checkForceReview()):?>
<div class="needNotReviewBox">
<div class='checkbox-primary'>
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
</div>
</div>
<?php endif;?>
</div>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->story->module;?></th>
<td>
<td colspan='2'>
<div class='input-group' id='moduleIdBox'>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");
@@ -39,7 +47,7 @@
echo "<div class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='90%'");
echo '&nbsp; ';
echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
echo html::a("javascript:void(0)", $lang->refreshIcon, '', "class='refresh' title='refresh' onclick='loadProductModules($productID)'");
echo '</div>';
}
?>
@@ -48,21 +56,13 @@
</tr>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
<td colspan='<?php echo $type == 'story' ? 4 : 2;?>' id='reviewerBox'>
<td colspan='2' id='reviewerBox'>
<div class="table-row">
<?php $required = $this->story->checkForceReview() ? 'required' : '';?>
<?php echo $this->story->checkForceReview() ? '' : html::hidden('needNotReview', 1);?>
<div class="table-col">
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control chosen' multiple");?>
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple $required");?>
</div>
<?php if(!$this->story->checkForceReview()):?>
<div class="table-col w-130px">
<span class="input-group-addon" style="border: 1px solid #dcdcdc; border-left-width: 0px;">
<div class='checkbox-primary'>
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo $needReview;?>/>
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
</div>
</span>
</div>
<?php endif;?>
</div>
</td>
</tr>
@@ -134,10 +134,6 @@
<?php echo html::textarea('spec', $spec, "rows='9' class='form-control kindeditor disabled-ie-placeholder' hidefocus='true' placeholder='" . htmlSpecialString($lang->noticePasteImg) . "'");?>
</td>
</tr>
<tr class='hide'>
<th><?php echo $lang->story->status;?></th>
<td><?php echo html::hidden('status', 'draft');?></td>
</tr>
<?php $this->printExtendFields('', 'table', 'columns=4');?>
<tr>
<th><?php echo $lang->story->legendAttatch;?></th>
@@ -147,7 +143,7 @@
<th><?php echo $lang->story->mailto;?></th>
<td colspan="4">
<div class="input-group">
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $mailto), "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $mailto), "class='form-control picker-select' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
@@ -162,10 +158,12 @@
<tfoot>
<tr>
<td colspan="5" class="text-center form-actions">
<?php echo html::hidden('type', $type) . html::submitButton();?>
<?php echo html::hidden('type', $type);?>
<?php echo html::hidden('product', $productID);?>
<?php echo html::hidden('plan', $planID);?>
<?php echo html::hidden('vision', 'lite');?>
<?php echo html::commonButton($lang->save, "id='saveButton'", 'btn btn-primary btn-wide');?>
<?php echo html::commonButton($lang->story->saveDraft, "id='saveDraftButton'", 'btn btn-secondary btn-wide');?>
<?php echo html::backButton();?>
</td>
</tr>
+49 -10
View File
@@ -14,14 +14,16 @@
<?php include $this->app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
<?php js::set('page', 'edit')?>
<?php js::set('oldProductID', $story->product);?>
<?php js::set('storyID', $story->id);?>
<?php js::set('parentStory', !empty($story->children));?>
<?php js::set('moveChildrenTips', $lang->story->moveChildrenTips);?>
<?php js::set('rawModule', $this->app->rawModule);?>
<?php js::set('reviewedReviewer', $reviewedReviewer);?>
<?php js::set('storyModule', $lang->story->module);?>
<?php js::set('reviewers', explode(',', $reviewers));?>
<?php js::set('reviewers', $reviewers);?>
<?php js::set('reviewerNotEmpty', $lang->story->notice->reviewerNotEmpty);?>
<?php js::set('feedbackSource', $config->story->feedbackSource); ?>
<?php js::set('storyStatus', $story->status);?>
<div class='main-content' id='mainContent'>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div class='main-header'>
@@ -34,7 +36,7 @@
<div class='main-row'>
<div class='main-col col-8'>
<div class='cell'>
<div class='form-group'>
<div class='form-group titleBox'>
<div class="input-control has-icon-right">
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
@@ -43,12 +45,40 @@
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $story->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".story-title" data-provide="colorpicker">
</div>
<?php echo html::input('title', $story->title, 'class="form-control disabled story-title" disabled="disabled"');?>
<?php echo html::input('title', $story->title, 'class="form-control disabled story-title"' . (strpos('draft,changing', $story->status) !== false ? '' : ' disabled="disabled"'));?>
</div>
</div>
<?php if(strpos('draft,changing', $story->status) !== false):?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->story->reviewers;?></div>
<div class='detail-content'>
<div class="table-row">
<?php if(!$this->story->checkForceReview()):?>
<div class="table-col">
<?php echo html::select('reviewer[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?>
</div>
<div class="table-col needNotReviewBox">
<span class="input-group-addon" style="border: 1px solid #dcdcdc; border-left-width: 0px;">
<div class='checkbox-primary'>
<input id='needNotReview' name='needNotReview' value='1' type='checkbox' class='no-margin' <?php echo empty($reviewers) ? 'checked' : '';?>/>
<label for='needNotReview'><?php echo $lang->story->needNotReview;?></label>
</div>
</span>
</div>
<?php else:?>
<div class="table-col">
<?php echo html::select('reviewer[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple required')?>
</div>
<?php endif;?>
</div>
</div>
</div>
<?php endif;?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->story->legendSpec;?></div>
<div class='detail-content article-content'><?php echo $story->spec;?></div>
<div class='detail-content article-content'>
<?php echo strpos('draft,changing', $story->status) !== false ? html::textarea('spec', htmlSpecialString($story->spec), "rows='5' class='form-control'") : $story->spec;?>
</div>
</div>
<?php $this->printExtendFields($story, 'div', 'position=left');?>
<div class='detail'>
@@ -61,7 +91,15 @@
<?php
echo html::hidden('lastEditedDate', $story->lastEditedDate);
echo html::hidden('product', $story->product);
echo html::submitButton($lang->save);
if(strpos('draft,changing', $story->status) !== false)
{
echo html::commonButton($lang->save, "id='saveButton'", 'btn btn-primary btn-wide');
echo html::commonButton($story->status == 'changing' ? $lang->story->doNotSubmit : $lang->story->saveDraft, "id='saveDraftButton'", 'btn btn-secondary btn-wide');
}
else
{
echo html::submitButton($lang->save);
}
if(!isonlybody()) echo html::backButton();
?>
</div>
@@ -85,7 +123,7 @@
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story&currentModuleID=0&branch=$story->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo '&nbsp; ';
echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModules($story->product)'");
echo html::a("javascript:void(0)", $lang->refreshIcon, '', "class='refresh' title='$lang->refresh' onclick='loadProductModules($story->product)'");
echo '</span>';
}
?>
@@ -129,7 +167,7 @@
<th><?php echo $lang->story->mailto;?></th>
<td>
<div class='input-group'>
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $story->mailto), "class='form-control chosen' multiple");?>
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $story->mailto), "class='form-control picker-select' multiple");?>
<?php echo $this->fetch('my', 'buildContactLists');?>
</div>
</td>
@@ -145,12 +183,13 @@
</tr>
<tr>
<th><?php echo $lang->story->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="form-control chosen"');?></td>
<?php $assignedToList = $story->status == 'closed' ? $users + array('closed' => 'Closed') : $users;?>
<td><?php echo html::select('assignedTo', $assignedToList, $story->assignedTo, 'class="form-control chosen"');?></td>
</tr>
<?php if($isShowReviewer):?>
<?php if($story->status == 'reviewing'):?>
<tr>
<th><?php echo $lang->story->reviewers;?></th>
<td><?php echo html::select('reviewer[]', $productReviewers, $reviewers, 'class="form-control chosen" multiple')?></td>
<td><?php echo html::select('reviewer[]', $productReviewers, $reviewers, 'class="form-control picker-select" multiple')?></td>
</tr>
<?php endif;?>
<?php if($story->status == 'closed'):?>
+16 -2
View File
@@ -108,7 +108,14 @@
<td class='c-actions'>
<?php
common::printIcon('story', 'change', "storyID=$child->id", $child, 'list', 'alter');
common::printIcon('story', 'review', "storyID=$child->id", $child, 'list', 'search', '', 'iframe showinonlybody', true);
if(strpos('draft,changing', $child->status) !== false)
{
common::printIcon('story', 'submitReview', "storyID=$child->id", $child, 'list', 'sub-review', '', 'iframe showinonlybody', true);
}
else
{
common::printIcon('story', 'review', "storyID=$child->id", $child, 'list', 'search', '', 'iframe showinonlybody', true);
}
common::printIcon('story', 'assignTo', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'close', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
common::printIcon('story', 'activate', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true);
@@ -134,7 +141,14 @@
<?php if(!$story->deleted):?>
<?php
common::printIcon('story', 'change', "storyID=$story->id", $story, 'button', 'alter', '', 'showinonlybody');
common::printIcon('story', 'review', "storyID=$story->id", $story, 'button', 'search', '', 'showinonlybody');
if(strpos('draft,changing', $story->status) !== false)
{
common::printIcon('story', 'submitReview', "storyID=$story->id", $story, 'button', 'sub-review', '', 'iframe showinonlybody', true);
}
else
{
common::printIcon('story', 'review', "storyID=$story->id", $story, 'button', 'search', '', 'iframe showinonlybody', true);
}
if($story->status == 'active' and $story->stage == 'wait' and $story->parent <= 0 and !isonlybody())
{
$divideLang = $lang->story->subdivide;
+3 -8
View File
@@ -147,16 +147,11 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
<th><?php echo $lang->story->reviewedBy;?></th>
<td colspan='2' id='reviewerBox'>
<div class="table-row">
<?php if(!$this->story->checkForceReview()):?>
<?php $required = $this->story->checkForceReview() ? 'required' : '';?>
<?php echo $this->story->checkForceReview() ? '' : html::hidden('needNotReview', 1);?>
<div class="table-col">
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple");?>
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple $required");?>
</div>
<?php echo html::hidden('needNotReview', 1);?>
<?php else:?>
<div class="table-col">
<?php echo html::select('reviewer[]', $reviewers, empty($needReview) ? $product->PO : '', "class='form-control picker-select' multiple required");?>
</div>
<?php endif;?>
</div>
</td>
</tr>