aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-21 02:18:15 +0800
committerGitHub <noreply@github.com>2022-12-20 12:18:15 -0600
commit495b8b3635bdcc42aa419be7845c9bbaf72d7473 (patch)
tree470c8f81f6f92f8228a109fb1314275d37918cfa /templates/repo
parent659055138b6d32492b20c9f4d1d5a3cdaa47188d (diff)
downloadgitea-495b8b3635bdcc42aa419be7845c9bbaf72d7473.tar.gz
gitea-495b8b3635bdcc42aa419be7845c9bbaf72d7473.zip
Fix delete secret modal (#22187)
Fix #22181
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/settings/deploy_keys.tmpl4
-rw-r--r--templates/repo/settings/secrets.tmpl22
2 files changed, 23 insertions, 3 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl
index 31d1c1f7ab..32a1258b3a 100644
--- a/templates/repo/settings/deploy_keys.tmpl
+++ b/templates/repo/settings/deploy_keys.tmpl
@@ -51,7 +51,7 @@
{{range .Deploykeys}}
<div class="item">
<div class="right floated content">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+ <button class="ui red tiny button delete-button" data-modal-id="delete-deploy_keys-modal" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}}
</button>
</div>
@@ -79,7 +79,7 @@
{{template "repo/settings/secrets" .}}
</div>
-<div class="ui small basic delete modal">
+<div class="ui small basic delete modal" id="delete-deploy_keys-modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
{{.locale.Tr "repo.settings.deploy_key_deletion"}}
diff --git a/templates/repo/settings/secrets.tmpl b/templates/repo/settings/secrets.tmpl
index 6fb97beb4a..5eb917a83b 100644
--- a/templates/repo/settings/secrets.tmpl
+++ b/templates/repo/settings/secrets.tmpl
@@ -33,7 +33,7 @@
{{range .Secrets}}
<div class="item">
<div class="right floated content">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/secrets/delete" data-id="{{.ID}}">
+ <button class="ui red tiny button delete-button" data-modal-id="delete-secret-modal" data-url="{{$.Link}}/secrets/delete" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}}
</button>
</div>
@@ -58,3 +58,23 @@
{{end}}
</div>
</div>
+
+<div class="ui small basic delete modal" id="delete-secret-modal">
+ <div class="ui icon header">
+ {{svg "octicon-trash"}}
+ {{.locale.Tr "secrets.deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.locale.Tr "secrets.deletion.description"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.locale.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.locale.Tr "modal.yes"}}
+ </div>
+ </div>
+</div>