Skip to content
Snippets Groups Projects
Verified Commit a6ad55b2 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3511168 by grimreaper, tocab, acbramley, smustgrave: Node preview modal: use Drupal API

parent 24dcc8dd
No related branches found
No related tags found
1 merge request!5423Draft: Resolve #3329907 "Test2"
Pipeline #499047 failed
......@@ -34,13 +34,13 @@
const $previewDialog = $(
`<div>${Drupal.theme('nodePreviewModal')}</div>`,
).appendTo('body');
Drupal.dialog($previewDialog, {
const confirmationDialog = Drupal.dialog($previewDialog, {
title: Drupal.t('Leave preview?'),
buttons: [
{
text: Drupal.t('Cancel'),
click() {
$(this).dialog('close');
confirmationDialog.close();
},
},
{
......@@ -50,7 +50,8 @@
},
},
],
}).showModal();
});
confirmationDialog.showModal();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment