Ghost/ghost/admin/app/components/modals/design/confirm-delete-theme.hbs
Kevin Ansfield b2177e636e Fixed enter key not triggering confirm action in delete theme modal
no issue

- added missing key handler
2021-10-12 07:26:18 +01:00

20 lines
1005 B
Handlebars

<div class="modal-content" {{on-key "Enter" (perform this.deleteThemeTask)}}>
<header class="modal-header" data-test-modal="delete-theme">
<h1>Are you sure you want to delete this</h1>
</header>
<button type="button" class="close" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
<div class="modal-body">
<p>You're about to delete "<strong>{{@data.theme.name}}</strong>". This is permanent! We warned you, k? Maybe <a href="#" {{on "click" this.downloadTheme}}>download your theme before continuing</a></p>
</div>
<div class="modal-footer">
<button {{on "click" (fn @close false)}} class="gh-btn" data-test-button="cancel"><span>Stay</span></button>
<GhTaskButton
@buttonText="Delete"
@successText="Deleted"
@task={{this.deleteThemeTask}}
@class="gh-btn gh-btn-red gh-btn-icon"
data-test-button="delete" />
</div>
</div>