Files
piratepoet/views/form/front_end_form.html
Pavel Dohnal 5c9d844e0d Display close icon
[MAILPOET-2963]
2020-07-07 08:35:21 +02:00

70 lines
2.1 KiB
HTML

<% block content %>
<% if(before_widget) %>
<%= before_widget | raw %>
<% endif %>
<% if(title) %>
<%= before_title | raw %><%= title | raw %><%= after_title | raw %>
<% endif %>
<div class="mailpoet_form_popup_overlay"></div>
<div
id="<%= form_html_id %>"
class="mailpoet_form mailpoet_form_<%= form_type %>"
<% if(is_preview) %>
data-is-preview="1"
data-editor-url="<%= editor_url %>"
<% endif %>
>
<% if form_type == 'popup' or form_type == 'fixed_bar' or form_type == 'slide_in' %>
<img
class="mailpoet_form_close_icon"
alt="close"
width=20
height=20
src='<%= image_url("form_close_icon/" ~ close_button_icon ~ ".svg") %>'
>
<% endif %>
<%= styles | raw %>
<form
target="_self"
method="post"
action="<%= admin_url('admin-post.php?action=mailpoet_subscription_form') | raw %>"
class="mailpoet_form mailpoet_form_form mailpoet_form_<%= form_type %>"
novalidate
data-delay="<%= delay %>"
data-position="<%= position %>"
data-background-color="<%= backgroundColor %>"
data-font-family="<%= fontFamily %>"
>
<input type="hidden" name="data[form_id]" value="<%= form_id %>" />
<input type="hidden" name="token" value="<%= token %>" />
<input type="hidden" name="api_version" value="<%= api_version %>" />
<input type="hidden" name="endpoint" value="subscribers" />
<input type="hidden" name="mailpoet_method" value="subscribe" />
<%= html | raw %>
<div class="mailpoet_message">
<p class="mailpoet_validate_success"
<% if not(success) %>
style="display:none;"
<% endif %>
><%= form_success_message %>
</p>
<p class="mailpoet_validate_error"
<% if not(error) %>
style="display:none;"
<% endif %>
><% if (error) %>
<%= __("An error occurred, make sure you have filled all the required fields.") %>
<% endif %>
</p>
</div>
</form>
</div>
<% if(after_widget) %>
<%= after_widget | raw %>
<% endif %>
<% endblock %>