summaryrefslogtreecommitdiffstats
path: root/templates/base/modal_actions_confirm.tmpl
blob: 361f214466fd8f24247c579d8abec137f44730d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{/*
Template Attributes:
* locale
* ModalButtonStyle: "yes" (default) or "confirm"
* ModalButtonCancelText
* ModalButtonOkText

The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal internally
*/}}
<div class="actions">
	{{$textNegitive := .locale.Tr "modal.no"}}
	{{$textPositive := .locale.Tr "modal.yes"}}
	{{if eq .ModalButtonStyle "confirm"}}
		{{$textNegitive = .locale.Tr "modal.cancel"}}
		{{$textPositive = .locale.Tr "modal.confirm"}}
	{{end}}
	{{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}}
	{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
	<button class="ui red cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button>
	<button class="ui green ok button">{{svg "octicon-check"}} {{$textPositive}}</button>
</div>