From 6250fe1dc15eccc18cdc4261e354c1c77f0a7fca Mon Sep 17 00:00:00 2001 From: delvh Date: Tue, 21 Mar 2023 01:41:57 +0100 Subject: [PATCH] Fix `.locale.Tr` function not found in delete modal (#23468) Caught by @wxiaoguang in https://github.com/go-gitea/gitea/pull/23337#issuecomment-1467317742. Additionally, there were three instances that have the same content as `templates/base/deletion_modal_actions.tmpl` but that are not intended to delete something. Instead of renaming the template above, these instances were simply re-hard-coded again. Renaming/improving the template above is left for future PRs. --- templates/admin/repo/unadopted.tmpl | 22 ++++++++++++++++++++-- templates/user/settings/repos.tmpl | 13 +++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 7ff41d503a..a8e04850d0 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -43,7 +43,16 @@ - {{template "base/delete_modal_actions" .}} +
+ + +
@@ -61,7 +70,16 @@ - {{template "base/delete_modal_actions" .}} +
+ + +
diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 2e107ca7fa..6742cb1671 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -50,7 +50,16 @@ {{$.CsrfTokenHtml}} - {{template "base/delete_modal_actions" .}} +
+ + +
{{end}} @@ -68,7 +77,7 @@ {{$.CsrfTokenHtml}} - {{template "base/delete_modal_actions" .}} + {{template "base/delete_modal_actions" $}} {{end}}