[GITEA] Tidy up archive modal

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

(cherry picked from commit 576d7ec759baefd2382d565212c3168e38bbdd75)
(cherry picked from commit 8b1225f9742cc0d3942824895923cbc8e9d49d04)
(cherry picked from commit c2c47972ee492686842b1623f9fe941a0e599f0a)
(cherry picked from commit eec301806b925388585546edc6407e3f6d644f44)
(cherry picked from commit 6b5e728f0aaa87e2711c1c2d2111446fc412e0ca)
(cherry picked from commit 3681691e65a73ef59205b066320c9ce58d4d80e4)
(cherry picked from commit e39dfa550d691ff73a05a507d4cb2fd073940088)
(cherry picked from commit 0c78c8c5ac6970495cde3e2737ed05b200e02f5a)
(cherry picked from commit 661cf72db0)

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

(cherry picked from commit 4bb6ee71f0)
This commit is contained in:
Gusted 2023-09-13 01:08:37 +02:00 committed by Earl Warren
parent 6a2d2fa243
commit ddafd8fbe3
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -976,21 +976,24 @@
{{end}} {{end}}
</div> </div>
<div class="content"> <div class="content">
<p> <div class="ui warning message">
{{if .Repository.IsArchived}} {{if .Repository.IsArchived}}
{{ctx.Locale.Tr "repo.settings.unarchive.text"}} {{ctx.Locale.Tr "repo.settings.unarchive.text"}}
{{else}} {{else}}
{{ctx.Locale.Tr "repo.settings.archive.text"}} {{ctx.Locale.Tr "repo.settings.archive.text"}}
{{end}} {{end}}
</p>
</div> </div>
<form action="{{.Link}}" method="post"> <form action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}"> <input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
<input type="hidden" name="repo_id" value="{{.Repository.ID}}"> <input type="hidden" name="repo_id" value="{{.Repository.ID}}">
{{template "base/modal_actions_confirm" .}} <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> </form>
</div> </div>
</div>
{{end}} {{end}}
{{end}} {{end}}