code.gitea.io/gitea@v1.22.3/templates/base/modal_actions_confirm.tmpl (about) 1 {{/* 2 Two buttons (negative, positive): 3 * ModalButtonTypes: "yes" (default) or "confirm" 4 * ModalButtonCancelText 5 * ModalButtonOkText 6 7 Single danger button (GitHub-like): 8 * ModalButtonDangerText "This action will destroy your data" 9 10 The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal internally 11 */}} 12 <div class="actions"> 13 {{if .ModalButtonDangerText}} 14 <button class="ui danger red ok button">{{.ModalButtonDangerText}}</button> 15 {{else}} 16 {{$textNegitive := ctx.Locale.Tr "modal.no"}} 17 {{$textPositive := ctx.Locale.Tr "modal.yes"}} 18 {{if eq .ModalButtonTypes "confirm"}} 19 {{$textNegitive = ctx.Locale.Tr "modal.cancel"}} 20 {{$textPositive = ctx.Locale.Tr "modal.confirm"}} 21 {{end}} 22 {{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}} 23 {{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}} 24 <button class="ui cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button> 25 <button class="ui primary ok button">{{svg "octicon-check"}} {{$textPositive}}</button> 26 {{end}} 27 </div>