1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00

[GITEA] Tidy up archive modal

- Make it consistent with the other modals of the dangerous actions.

(cherry picked from commit 576d7ec759)
(cherry picked from commit 8b1225f974)
(cherry picked from commit c2c47972ee)
(cherry picked from commit eec301806b)
(cherry picked from commit 6b5e728f0a)
(cherry picked from commit 3681691e65)
(cherry picked from commit e39dfa550d)
(cherry picked from commit 0c78c8c5ac)
(cherry picked from commit 661cf72db0)

[GITEA] Tidy up archive modal (squash) ctx.Locale

(cherry picked from commit 4bb6ee71f0)
(cherry picked from commit ddafd8fbe3)
(cherry picked from commit 9467a6915f)
(cherry picked from commit e632b10380)
(cherry picked from commit 6609d07591)
(cherry picked from commit c130b8a09a)
(cherry picked from commit 1080de5754)
(cherry picked from commit a9813744d4)
(cherry picked from commit 93232f410a)
(cherry picked from commit 1bf1c6b6c1)
(cherry picked from commit cb703ac292)
This commit is contained in:
Gusted 2023-09-13 01:08:37 +02:00 committed by Earl Warren
parent 6578ec4ed6
commit ac48797029
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -982,20 +982,23 @@
{{end}}
</div>
<div class="content">
<p>
<div class="ui warning message">
{{if .Repository.IsArchived}}
{{ctx.Locale.Tr "repo.settings.unarchive.text"}}
{{else}}
{{ctx.Locale.Tr "repo.settings.archive.text"}}
{{end}}
</p>
</div>
<form action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
{{template "base/modal_actions_confirm" .}}
</div>
<form action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
<div class="text right actions">
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
<button class="ui red button">{{ctx.Locale.Tr "repo.settings.archive.button"}}</button>
</div>
</form>
</div>
</div>
{{end}}
{{end}}