<div id="btnwrapExit" class="editor__btn-wrap">
{% include '@ui/common/buttons/default.html.twig' with {
text: 'Cancel',
htmlId: 'btnExitModal'
} %}
</div>
{% inline_html %}
{% embed '@ui/features/workflows/modal.html.twig' with {
htmlId: 'modalExitModal'
} %}
{% block header %}{% endblock %}
{% block body %}
<p class="text-center">
Are you sure you want to exit the editor?
Current changes will be lost.
</p>
<p>
{% include '@ui/common/buttons/default.html.twig' with {
text: 'Exit Editor',
helper: 'danger',
size: 'lg',
block: true,
link: redirpath(
(draft is defined and draft is not empty) ? routes.draft_list : routes.proxy_list, {
container: container.id,
module: moduleConfig.key,
proxy: (draft is defined and draft is not empty) ? proxy.id : null,
draft: null
})
} %}
</p>
{% endblock %}
{% endembed %}
{% inline_script %}
<script>
$(function() {
$('#btnExitModal').click(function (e) {
$('#modalExitModal').modal({});
e.preventDefault();
});
});
</script>
{% endinline %}
{% endinline %}