* Finish task 39216.

This commit is contained in:
Guanxiying
2021-06-10 14:08:06 +08:00
parent b995276fb1
commit 1847e38c73
4 changed files with 15 additions and 28 deletions
+4 -5
View File
@@ -7,12 +7,11 @@ $(function()
$form.css('min-height', $form.height());
})
$('#gitlabHost, #gitlabToken').change(function()
$('#gitlabHost').change(function()
{
host = Base64.encode($('#gitlabHost').val());
token = $('#gitlabToken').val();
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + '&token=' + token);
if(host == '' || token == '') return false;
host = $('#gitlabHost').val();
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host);
if(host == '') return false;
$.get(url, function(response)
{
+4 -6
View File
@@ -7,12 +7,11 @@ $(function()
$form.css('min-height', $form.height());
})
$('#gitlabHost, #gitlabToken').change(function()
$('#gitlabHost').change(function()
{
host = Base64.encode($('#gitlabHost').val());
token = $('#gitlabToken').val();
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + '&token=' + token);
if(host == '' || token == '') return false;
host = $('#gitlabHost').val();
if(host == '') return false;
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host);
$.get(url, function(response)
{
@@ -28,7 +27,6 @@ $(function()
$('#name').val($option.data('name'));
$(this).chosen().trigger("chosen:updated");
});
});
function scmChanged(scm)
+1 -5
View File
@@ -34,11 +34,7 @@
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabHost;?></th>
<td><?php echo html::input('gitlabHost', '', "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabToken;?></th>
<td><?php echo html::input('gitlabToken', '', "class='form-control'");?>
<td><?php echo html::select('gitlabHost', $gitlabHosts, '', "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabProject;?></th>
+6 -12
View File
@@ -34,17 +34,11 @@
<tr>
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, $repo->SCM, "onchange='scmChanged(this.value)' class='form-control'"); ?></td>
<td>
<span class="tips-git"><?php echo $lang->repo->syncTips; ?></span>
</td>
<td><span class="tips-git"><?php echo $lang->repo->syncTips; ?></span></td>
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabHost;?></th>
<td><?php echo html::input('gitlabHost', $repo->client, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabToken;?></th>
<td><?php echo html::input('gitlabToken', $repo->password, "class='form-control'");?>
<td><?php echo html::select('gitlabHost', $gitlabHosts, $repo->client, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
</tr>
<tr class='gitlab hide'>
<th><?php echo $lang->repo->gitlabProject;?></th>
@@ -59,8 +53,8 @@
<th><?php echo $lang->repo->path; ?></th>
<td class='required'><?php echo html::input('path', $repo->path, "class='form-control'"); ?></td>
<td class='muted'>
<span class="tips-git"><?php echo $lang->repo->example->path->git;?></span>
<span class="tips-svn"><?php echo $lang->repo->example->path->svn;?></span>
<span class="tips-git"><?php echo $lang->repo->example->path->git;?></span>
<span class="tips-svn"><?php echo $lang->repo->example->path->svn;?></span>
</td>
</tr>
<tr>
@@ -72,8 +66,8 @@
<th><?php echo $lang->repo->client;?></th>
<td class='required'><?php echo html::input('client', $repo->client, "class='form-control'")?></td>
<td class='muted'>
<span class="tips-git"><?php echo $lang->repo->example->client->git;?></span>
<span class="tips-svn"><?php echo $lang->repo->example->client->svn;?></span>
<span class="tips-git"><?php echo $lang->repo->example->client->git;?></span>
<span class="tips-svn"><?php echo $lang->repo->example->client->svn;?></span>
</td>
</tr>
<tr class="account-fields hide-gitlab">