Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
27 lines
1.1 KiB
Handlebars
27 lines
1.1 KiB
Handlebars
{{/* Two buttons (negative, positive):
|
|
* ModalButtonTypes: "yes" (default) or "confirm"
|
|
* ModalButtonCancelText
|
|
* ModalButtonOkText
|
|
|
|
Single danger button (GitHub-like):
|
|
* ModalButtonDangerText "This action will destroy your data"
|
|
|
|
The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal internally
|
|
*/}}
|
|
<div class="actions">
|
|
{{if .ModalButtonDangerText}}
|
|
<button type="submit" class="ui danger red ok button">{{.ModalButtonDangerText}}</button>
|
|
{{else}}
|
|
{{$textNegative := ctx.Locale.Tr "modal.no"}}
|
|
{{$textPositive := ctx.Locale.Tr "modal.yes"}}
|
|
{{if eq .ModalButtonTypes "confirm"}}
|
|
{{$textNegative = ctx.Locale.Tr "modal.cancel"}}
|
|
{{$textPositive = ctx.Locale.Tr "modal.confirm"}}
|
|
{{end}}
|
|
{{if .ModalButtonCancelText}}{{$textNegative = .ModalButtonCancelText}}{{end}}
|
|
{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
|
|
<button type="button" class="ui cancel button">{{svg "octicon-x"}} {{$textNegative}}</button>
|
|
<button type="submit" class="ui primary ok button">{{svg "octicon-check"}} {{$textPositive}}</button>
|
|
{{end}}
|
|
</div>
|