2019-05-17 17:29:21 +00:00
|
|
|
<div class="confirm-action" ...attributes>
|
|
|
|
<BasicDropdown
|
2021-12-17 03:44:29 +00:00
|
|
|
@horizontalPosition={{this.horizontalPosition}}
|
|
|
|
@verticalPosition={{this.verticalPosition}}
|
2022-08-15 16:06:30 +00:00
|
|
|
@onOpen={{this.toggleConfirm}}
|
|
|
|
@onClose={{this.toggleConfirm}}
|
2021-12-17 03:44:29 +00:00
|
|
|
as |d|
|
|
|
|
>
|
|
|
|
<d.Trigger
|
|
|
|
@htmlTag="button"
|
2022-08-15 16:06:30 +00:00
|
|
|
class={{concat @buttonClasses " popup-menu-trigger" (if d.isOpen " is-active")}}
|
2019-05-17 17:29:21 +00:00
|
|
|
type="button"
|
2021-12-17 03:44:29 +00:00
|
|
|
disabled={{this.disabled}}
|
2019-05-17 17:29:21 +00:00
|
|
|
data-test-confirm-action-trigger="true"
|
|
|
|
>
|
|
|
|
{{yield}}
|
2022-08-15 16:06:30 +00:00
|
|
|
{{#if (eq @buttonClasses "toolbar-link")}}
|
2022-08-18 16:53:56 +00:00
|
|
|
<Chevron @direction={{if this.showConfirm "up" "down"}} data-test-confirm-action-chevron />
|
2019-05-17 17:29:21 +00:00
|
|
|
{{/if}}
|
2021-12-17 03:44:29 +00:00
|
|
|
</d.Trigger>
|
2022-02-15 17:43:37 +00:00
|
|
|
<d.Content @defaultClass="popup-menu-content">
|
2019-05-17 17:29:21 +00:00
|
|
|
<div class="box confirm-action-message">
|
|
|
|
<div class="message is-highlight">
|
2022-08-18 16:53:56 +00:00
|
|
|
<div class="message-title" data-test-confirm-action-title>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="alert-triangle-fill" />
|
2021-12-17 03:44:29 +00:00
|
|
|
{{this.confirmTitle}}
|
2019-05-17 17:29:21 +00:00
|
|
|
</div>
|
|
|
|
<p>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{this.confirmMessage}}
|
2019-05-17 17:29:21 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="confirm-action-options">
|
|
|
|
<button
|
|
|
|
type="button"
|
2022-05-20 15:41:24 +00:00
|
|
|
disabled={{or this.disabled this.isRunning}}
|
2019-05-17 17:29:21 +00:00
|
|
|
class="link is-destroy"
|
|
|
|
data-test-confirm-button="true"
|
2022-08-18 16:53:56 +00:00
|
|
|
{{on "click" (fn this.onConfirm d.actions)}}
|
2019-05-17 17:29:21 +00:00
|
|
|
>
|
2022-05-20 15:41:24 +00:00
|
|
|
{{#if this.isRunning}}
|
|
|
|
<span class="loader is-inline-block"></span>
|
|
|
|
{{else}}
|
|
|
|
{{this.confirmButtonText}}
|
|
|
|
{{/if}}
|
2019-05-17 17:29:21 +00:00
|
|
|
</button>
|
2022-08-18 16:53:56 +00:00
|
|
|
<button type="button" class="link" data-test-confirm-cancel-button="true" {{on "click" d.actions.close}}>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{this.cancelButtonText}}
|
2019-05-17 17:29:21 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-17 03:44:29 +00:00
|
|
|
</d.Content>
|
2019-05-17 17:29:21 +00:00
|
|
|
</BasicDropdown>
|
2021-12-17 03:44:29 +00:00
|
|
|
</div>
|