From 56d79301b9f212e7801cbced1475238cc61c0748 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Fri, 8 Oct 2021 18:15:09 +0200 Subject: [PATCH] Move add deploy key form before the list and add a cancel button (#17228) --- templates/repo/settings/deploy_keys.tmpl | 73 +++++++++++++----------- web_src/js/index.js | 3 + 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index d2e9e256d2..68ab36b593 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -4,6 +4,45 @@ {{template "repo/settings/navbar" .}}
{{template "base/alert" .}} +
+

+ {{.i18n.Tr "repo.settings.add_deploy_key"}} +
+ +
+

+
+
+ {{.CsrfTokenHtml}} +
+ {{.i18n.Tr "repo.settings.deploy_key_desc"}} +
+
+ + +
+
+ + +
+
+
+ + + {{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}} +
+
+ +
+
+
+

{{.i18n.Tr "repo.settings.deploy_keys"}}
@@ -43,40 +82,6 @@ {{.i18n.Tr "repo.settings.no_deploy_keys"}} {{end}}
-
-
-

- {{.i18n.Tr "repo.settings.add_deploy_key"}} -

-
-
- {{.CsrfTokenHtml}} -
- {{.i18n.Tr "repo.settings.deploy_key_desc"}} -
-
- - -
-
- - -
-
-
- - - {{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}} -
-
- -
-
-

diff --git a/web_src/js/index.js b/web_src/js/index.js index d6787e89bf..868b3ad049 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -2750,6 +2750,9 @@ $(document).ready(async () => { $('.show-panel.button').on('click', function () { $($(this).data('panel')).show(); }); + $('.hide-panel.button').on('click', function () { + $($(this).data('panel')).hide(); + }); $('.show-create-branch-modal.button').on('click', function () { $('#create-branch-form')[0].action = $('#create-branch-form').data('base-action') + $(this).data('branch-from'); $('#modal-create-branch-from-span').text($(this).data('branch-from'));