From 1847e38c73db0495d07036f4e47cceb2d0f2cb42 Mon Sep 17 00:00:00 2001 From: Guanxiying Date: Thu, 10 Jun 2021 14:08:06 +0800 Subject: [PATCH] * Finish task 39216. --- module/repo/js/create.js | 9 ++++----- module/repo/js/edit.js | 10 ++++------ module/repo/view/create.html.php | 6 +----- module/repo/view/edit.html.php | 18 ++++++------------ 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/module/repo/js/create.js b/module/repo/js/create.js index 0af0d52404..2b9bff72e5 100644 --- a/module/repo/js/create.js +++ b/module/repo/js/create.js @@ -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) { diff --git a/module/repo/js/edit.js b/module/repo/js/edit.js index cc79cbb2a5..e500686f04 100644 --- a/module/repo/js/edit.js +++ b/module/repo/js/edit.js @@ -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) diff --git a/module/repo/view/create.html.php b/module/repo/view/create.html.php index 446da06b4e..62536c4a24 100644 --- a/module/repo/view/create.html.php +++ b/module/repo/view/create.html.php @@ -34,11 +34,7 @@ repo->gitlabHost;?> - repo->placeholder->gitlabHost}'");?> - - - repo->gitlabToken;?> - + repo->placeholder->gitlabHost}'");?> repo->gitlabProject;?> diff --git a/module/repo/view/edit.html.php b/module/repo/view/edit.html.php index 15f6d76846..f2352a2338 100644 --- a/module/repo/view/edit.html.php +++ b/module/repo/view/edit.html.php @@ -34,17 +34,11 @@ repo->type; ?> repo->scmList, $repo->SCM, "onchange='scmChanged(this.value)' class='form-control'"); ?> - - repo->syncTips; ?> - + repo->syncTips; ?> repo->gitlabHost;?> - client, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?> - - - repo->gitlabToken;?> - password, "class='form-control'");?> + client, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?> repo->gitlabProject;?> @@ -59,8 +53,8 @@ repo->path; ?> path, "class='form-control'"); ?> - repo->example->path->git;?> - repo->example->path->svn;?> + repo->example->path->git;?> + repo->example->path->svn;?> @@ -72,8 +66,8 @@ repo->client;?> client, "class='form-control'")?> - repo->example->client->git;?> - repo->example->client->svn;?> + repo->example->client->git;?> + repo->example->client->svn;?>