Merge branch 'sugon' of https://gitlab.zcorp.cc/easycorp/zentaopms into sugon
This commit is contained in:
@@ -22,4 +22,10 @@ $(function ()
|
||||
});
|
||||
});
|
||||
|
||||
$("#needCI").change(function()
|
||||
{
|
||||
if(this.checked == false) $("#jobID").parent().parent().addClass('hidden');
|
||||
if(this.checked == true) $("#jobID").parent().parent().removeClass('hidden');
|
||||
});
|
||||
$("#needCI").trigger('change');
|
||||
});
|
||||
|
||||
+10
-19
@@ -169,27 +169,18 @@ class mrModel extends model
|
||||
*/
|
||||
public function update($MRID)
|
||||
{
|
||||
if (!empty($_POST['job']))
|
||||
{
|
||||
$repoID = $this->post->repo;
|
||||
$jobID = $this->post->job;
|
||||
|
||||
$MR = fixer::input('post')
|
||||
->setDefault('editedBy', $this->app->user->account)
|
||||
->setDefault('editedDate', helper::now())
|
||||
->add('repoID', $repoID)
|
||||
->add('jobID', $jobID)
|
||||
->get();
|
||||
}
|
||||
else
|
||||
{
|
||||
$MR = fixer::input('post')
|
||||
->setDefault('editedBy', $this->app->user->account)
|
||||
->setDefault('editedDate', helper::now())
|
||||
->get();
|
||||
}
|
||||
$MR = fixer::input('post')
|
||||
->setDefault('jobID', 0)
|
||||
->setDefault('repoID', 0)
|
||||
->setDefault('needCI', 0)
|
||||
->setDefault('editedBy', $this->app->user->account)
|
||||
->setDefault('editedDate', helper::now())
|
||||
->get();
|
||||
$oldMR = $this->getByID($MRID);
|
||||
|
||||
$this->dao->update(TABLE_MR)->data($MR)->checkIF($MR->needCI, 'jobID', 'notempty');
|
||||
if(dao::isError()) return array('result' => 'fail', 'message' => dao::getError());
|
||||
|
||||
/* Exec Job */
|
||||
if(isset($MR->jobID) && $MR->jobID)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
<th><?php echo $lang->mr->description;?></th>
|
||||
<td colspan='1'><?php echo html::textarea('description', $MR->description, "rows='3' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->devops->repo;?></th>
|
||||
<td colspan='1' class='required'><?php echo html::select('repoID', $repoList, $MR->repoID, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->mr->needCI;?></th>
|
||||
<td colspan='1'>
|
||||
@@ -75,13 +79,9 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->devops->repo;?></th>
|
||||
<td colspan='1' class='required'><?php echo html::select('repo', $repoList, $MR->repoID, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->job->common;?></th>
|
||||
<td colspan='1'><?php echo html::select('job', $jobList, $MR->jobID, "class='form-control chosen'");?></td>
|
||||
<td colspan='1' class='required'><?php echo html::select('jobID', $jobList, $MR->jobID, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->mr->assignee;?></th>
|
||||
|
||||
Reference in New Issue
Block a user