Ghost/ghost/admin/app/components/modals/confirm-unsaved-changes.hbs
Kevin Ansfield 6993e11286 Fixed close button in confirm modal causing navigation
no issue

- using an `<a>` instead of a `<button>` meant that the anchor link's default behaviour was being triggered when clicked leading to the browser navigating back to the dashboard
2021-09-30 16:26:20 +01:00

19 lines
786 B
Handlebars

<div class="modal-content">
<header class="modal-header" data-test-modal="unsaved-settings">
<h1>Are you sure you want to leave this page?</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>
Hey there! It looks like you didn't save the changes you made.
</p>
<p>Save before you go!</p>
</div>
<div class="modal-footer">
<button {{on "click" (fn @close false)}} class="gh-btn" data-test-stay-button><span>Stay</span></button>
<button {{on "click" (fn @close true)}} class="gh-btn gh-btn-red" data-test-leave-button><span>Leave</span></button>
</div>
</div>