2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.isIdle}}
|
2019-05-17 00:41:40 +00:00
|
|
|
<button
|
|
|
|
data-test-idle-button
|
|
|
|
type="button"
|
2021-02-10 14:38:37 +00:00
|
|
|
class="button {{if this.classes.idleButton this.classes.idleButton "is-danger is-outlined"}} is-important is-small"
|
2020-07-09 20:19:07 +00:00
|
|
|
disabled={{this.disabled}}
|
2019-05-17 00:41:40 +00:00
|
|
|
onclick={{action "promptForConfirmation"}}>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{this.idleText}}
|
2018-04-18 19:19:35 +00:00
|
|
|
</button>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{else if this.isPendingConfirmation}}
|
2019-11-19 08:10:46 +00:00
|
|
|
<span
|
|
|
|
data-test-confirmation-message
|
2021-02-10 14:38:37 +00:00
|
|
|
class="confirmation-text {{this.classes.confirmationMessage}} {{if this.alignRight "is-right-aligned"}} {{if this.inlineText "has-text-inline"}}">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{this.confirmationMessage}}
|
2019-11-19 08:10:46 +00:00
|
|
|
</span>
|
2018-08-24 20:41:14 +00:00
|
|
|
<button
|
|
|
|
data-test-cancel-button
|
|
|
|
type="button"
|
2021-02-10 14:38:37 +00:00
|
|
|
class="button is-outlined is-small {{if this.classes.cancelButton this.classes.cancelButton "is-dark"}}"
|
2020-07-09 20:19:07 +00:00
|
|
|
disabled={{this.awaitingConfirmation}}
|
2018-08-24 20:41:14 +00:00
|
|
|
onclick={{action (queue
|
|
|
|
(action "setToIdle")
|
2020-07-09 20:19:07 +00:00
|
|
|
(action this.onCancel)
|
2018-08-24 20:41:14 +00:00
|
|
|
)}}>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{this.cancelText}}
|
2018-04-18 19:19:35 +00:00
|
|
|
</button>
|
2018-08-24 20:41:14 +00:00
|
|
|
<button
|
|
|
|
data-test-confirm-button
|
2021-02-10 14:38:37 +00:00
|
|
|
class="button is-small {{if this.awaitingConfirmation "is-loading"}} {{if this.classes.confirmButton this.classes.confirmButton "is-danger"}}"
|
2020-07-09 20:19:07 +00:00
|
|
|
disabled={{this.awaitingConfirmation}}
|
2020-07-09 17:30:11 +00:00
|
|
|
onclick={{action "confirm"}}
|
|
|
|
type="button">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{this.confirmText}}
|
2018-04-18 19:19:35 +00:00
|
|
|
</button>
|
|
|
|
{{/if}}
|