Always display popups on form preview page
[MAILPOET-2743]
This commit is contained in:
committed by
Veljko V
parent
0b512fe81b
commit
51f138483c
@@ -73,21 +73,21 @@ jQuery(($) => {
|
||||
$('.mailpoet_form_close_icon').click((event) => {
|
||||
const closeIcon = $(event.target);
|
||||
const formDiv = closeIcon.parent();
|
||||
if (formDiv.data('is-preview')) return; // Do not close popup in preview
|
||||
closeForm(formDiv);
|
||||
});
|
||||
|
||||
$('div.mailpoet_form_fixed_bar, div.mailpoet_form_slide_in').each((index, element) => {
|
||||
const cookieValue = Cookies.get('popup_form_dismissed');
|
||||
if (cookieValue === '1') return;
|
||||
const formDiv = $(element);
|
||||
if (cookieValue === '1' && !formDiv.data('is-preview')) return;
|
||||
showForm(formDiv);
|
||||
});
|
||||
|
||||
$('div.mailpoet_form_popup').each((index, element) => {
|
||||
const cookieValue = Cookies.get('popup_form_dismissed');
|
||||
if (cookieValue === '1') return;
|
||||
|
||||
const formDiv = $(element);
|
||||
if (cookieValue === '1' && !formDiv.data('is-preview')) return;
|
||||
const showOverlay = true;
|
||||
showForm(formDiv, showOverlay);
|
||||
});
|
||||
|
@@ -8,7 +8,13 @@
|
||||
<% endif %>
|
||||
|
||||
<div class="mailpoet_form_popup_overlay"></div>
|
||||
<div id="<%= form_html_id %>" class="mailpoet_form mailpoet_form_<%= form_type %>">
|
||||
<div
|
||||
id="<%= form_html_id %>"
|
||||
class="mailpoet_form mailpoet_form_<%= form_type %>"
|
||||
<% if(is_preview) %>
|
||||
data-is-preview="1"
|
||||
<% endif %>
|
||||
>
|
||||
<% if form_type == 'popup' or form_type == 'fixed_bar' or form_type == 'slide_in' %>
|
||||
<img
|
||||
class="mailpoet_form_close_icon"
|
||||
|
Reference in New Issue
Block a user