* Correct editing a MR and optimize related front style
(some diff func mixd).
This commit is contained in:
@@ -6,8 +6,12 @@ $config->mr->create->skippedFields = 'projectID,repo,job,compile';
|
||||
$config->mr->create->requiredFields = 'gitlabID,sourceProject,sourceBranch,targetProject,targetBranch,title';
|
||||
|
||||
$config->mr->edit = new stdclass;
|
||||
$config->mr->edit->skippedFields = 'projectID,repo,job,compile';
|
||||
$config->mr->edit->requiredFields = 'gitlabID,sourceProject,sourceBranch,targetProject,targetBranch,title';
|
||||
|
||||
$config->mr->editor = new stdclass();
|
||||
$config->mr->editor->diff = array('id' => 'commentText', 'tools' => 'simpleTools');
|
||||
|
||||
$config->mr->maps = new stdclass;
|
||||
$config->mr->maps->sync = array();
|
||||
$config->mr->maps->sync['title'] = 'title|field|';
|
||||
@@ -24,4 +28,4 @@ $config->mr->maps->sync['mergeStatus'] = 'merge_status|field|';
|
||||
$config->mrapproval = new stdclass();
|
||||
$config->mrapproval->create = new stdclass();
|
||||
$config->mrapproval->create->skippedFields = '';
|
||||
$config->mrapproval->create->requiredFields = 'mrID,account,date,action';
|
||||
$config->mrapproval->create->requiredFields = 'mrID,account,date,action';
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
$(function () {
|
||||
$('#repo').change(function () {
|
||||
repoID = $(this).val();
|
||||
jobUrl = createLink('mr', 'ajaxGetJobList', "repoID=" + repoID);
|
||||
$.get(jobUrl, function (response) {
|
||||
$('#job').html('').append(response);
|
||||
$('#job').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
});
|
||||
|
||||
$('#job').change(function () {
|
||||
jobID = $(this).val();
|
||||
compileUrl = createLink('mr', 'ajaxGetCompileList', "job=" + jobID);
|
||||
$.get(compileUrl, function (response) {
|
||||
$('#compile').html('').append(response);
|
||||
$('#compile').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@@ -52,17 +52,17 @@
|
||||
<td colspan='1'><?php echo html::textarea('description', '', "rows='3' class='form-control'"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><?php echo $lang->mr->needPassCI; ?></th>
|
||||
<td colspan='1'>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name="needPassCI" value="1" id="needPassCI">
|
||||
<label for="needPassCI"><?php echo $lang->mr->needPassCI; ?></label>
|
||||
<label for="needPassCI"></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->devops->repo; ?></th>
|
||||
<td colspan='1'><?php echo html::select('repo', array(''), '', "class='form-control chosen'"); ?></td>
|
||||
<td colspan='1' class='required'><?php echo html::select('repo', array(''), '', "class='form-control chosen'"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->job->common; ?></th>
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('gitlabID', $MR->gitlabID);?>
|
||||
<?php js::set('projectID', $MR->sourceProject);?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
@@ -51,6 +53,28 @@
|
||||
<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->mr->needPassCI; ?></th>
|
||||
<td colspan='1'>
|
||||
<div class="checkbox-primary">
|
||||
<?php $checked = $MR->needPassCI == '1' ? 'checked' : '' ?>
|
||||
<input type="checkbox" <?php echo $checked; ?> name="needPassCI" value="1" id="needPassCI">
|
||||
<label for="needPassCI"></label>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->compile->result; ?></th>
|
||||
<td colspan='1'><?php echo html::select('compile', $compileList, $MR->compileID, "class='form-control chosen'"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->mr->assignee;?></th>
|
||||
<td><?php echo html::select('assignee', $users, $assignee, "class='form-control chosen'")?></td>
|
||||
|
||||
Reference in New Issue
Block a user