Files
piratepoet/views/form/front_end_form.html
Pavel Dohnal ec8adcae73 Move form wrapping to widget
[MAILPOET-2600]
2020-03-02 20:52:38 +00:00

50 lines
1.5 KiB
HTML

<% block content %>
<% if(before_widget) %>
<%= before_widget | raw %>
<% endif %>
<% if(title) %>
<%= before_title | raw %><%= title | raw %><%= after_title | raw %>
<% endif %>
<div id="<%= form_html_id %>" class="mailpoet_form mailpoet_form_<%= form_type %>">
<%= styles | raw %>
<form
target="_self"
method="post"
action="<%= admin_url('admin-post.php?action=mailpoet_subscription_form') | raw %>"
class="mailpoet_form mailpoet_form_<%= form_type %>"
novalidate
style="<%= form_element_styles %>"/* paragraphs (label + input)
>
<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 %>