Files
piratepoet/views/layout.html
Amine Ben hammou 025110af5d Add suggested articles to Beacon
[MAILPOET-2338]
2019-09-11 10:16:03 +01:00

158 lines
6.7 KiB
HTML

<% if sub_menu %>
<script type="text/javascript">
jQuery('.toplevel_page_mailpoet-newsletters.menu-top-last')
.addClass('wp-has-current-submenu')
.find('a[href$="<%= sub_menu %>"]')
.addClass('current')
.parent()
.addClass('current');
</script>
<% endif %>
<!-- system notices -->
<div id="mailpoet_notice_system" class="mailpoet_notice" style="display:none;"></div>
<!-- handlebars templates -->
<% block templates %><% endblock %>
<!-- main container -->
<div class="wrap">
<!-- notices -->
<div id="mailpoet_notice_error" class="mailpoet_notice" style="display:none;"></div>
<div id="mailpoet_notice_success" class="mailpoet_notice" style="display:none;"></div>
<!-- React notices -->
<div id="mailpoet_notices"></div>
<!-- title block -->
<% block title %><% endblock %>
<!-- content block -->
<% block content %><% endblock %>
</div>
<!-- stylesheets -->
<%= stylesheet(
'admin.css'
)%>
<%= do_action('mailpoet_styles_admin_after') %>
<!-- rtl specific stylesheet -->
<% if is_rtl() %>
<%= stylesheet('rtl.css') %>
<% endif %>
<% block after_css %><% endblock %>
<script type="text/javascript">
var mailpoet_date_format = "<%= wp_datetime_format()|escape('js') %>";
var mailpoet_time_format = "<%= wp_time_format()|escape('js') %>";
var mailpoet_version = "<%= mailpoet_version() %>";
var mailpoet_locale = "<%= mailpoet_locale() %>";
var mailpoet_polls_data = <%= json_encode(get_polls_data()) %>;
var mailpoet_polls_visibility = <%= json_encode(get_polls_visiblity()) %>;
var mailpoet_premium_version = <%= json_encode(mailpoet_premium_version()) %>;
var mailpoet_analytics_enabled = <%= is_analytics_enabled() | json_encode %>;
var mailpoet_analytics_data = <%= json_encode(get_analytics_data()) %>;
var mailpoet_analytics_public_id = <%= json_encode(get_analytics_public_id()) %>;
var mailpoet_analytics_new_public_id = <%= is_analytics_public_id_new() | json_encode %>;
var mailpoet_free_domains = <%= json_encode(mailpoet_free_domains()) %>;
var mailpoet_woocommerce_active = <%= json_encode(is_woocommerce_active()) %>;
// RFC 5322 standard; http://emailregex.com/ combined with https://google.github.io/closure-library/api/goog.format.EmailAddress.html#isValid
var mailpoet_email_regex = /(?=^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$)(?=^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))/;
var mailpoet_feature_flags = <%= json_encode(feature_flags) %>;
var mailpoet_referral_id = <%= json_encode(referral_id) %>;
</script>
<!-- javascripts -->
<%= javascript(
'vendor.js',
'mailpoet.js'
)%>
<%= localize({
'ajaxFailedErrorMessage': __('An error has happened while performing a request, the server has responded with response code %d'),
'senderEmailAddressWarning1': _x('You might not reach the inbox of your subscribers if you use this email address.', 'In the last step, before sending a newsletter. URL: ?page=mailpoet-newsletters#/send/2'),
'senderEmailAddressWarning2': _x('Use an address like %suggested for the Sender and put %originalSender in the <em>Reply-to</em> field below.', 'In the last step, before sending a newsletter. URL: ?page=mailpoet-newsletters#/send/2'),
'senderEmailAddressWarning3': _x('Read more.'),
'mailerSendingResumedNotice': __('Sending has been resumed.'),
}) %>
<% block translations %><% endblock %>
<% block after_translations %><% endblock %>
<%= javascript(
'admin_vendor_chunk.js',
'admin_vendor.js'
)%>
<%= do_action('mailpoet_scripts_admin_before') %>
<%= javascript(
'admin.js'
)%>
<%= javascript('lib/analytics.js') %>
<% set has_valid_premium_key = mailpoet_has_valid_premium_key() %>
<% set helpscout_form_id = '1c666cab-c0f6-4614-bc06-e5d0ad78db2b' %>
<%if has_valid_premium_key %>
<% set helpscout_form_id = 'e93d0423-1fa6-4bbc-9df9-c174f823c35f' %>
<% endif %>
<script type="text/javascript">!function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});</script>
<script type="text/javascript"></script>
<script type="text/javascript">
if(window['Beacon'] !== undefined) {
window.Beacon('init', '<%= helpscout_form_id %>');
// HelpScout Beacon: Configuration
window.Beacon("config", {
icon: 'message',
zIndex: 50000,
instructions: "<%= __('Want to give feedback to the MailPoet team? Contact us here. Please provide as much information as possible!') %>",
showContactFields: true
});
// HelpScout Beacon: Custom information
window.Beacon("identify",
<%= json_encode(get_helpscout_data()) %>
);
if (window.mailpoet_beacon_articles) {
window.Beacon('suggest', window.mailpoet_beacon_articles)
}
}
</script>
<script>
Parsley.addMessages('mailpoet', {
defaultMessage: '<%= __("This value seems to be invalid.") %>',
type: {
email: '<%= __("This value should be a valid email.") %>',
url: '<%= __("This value should be a valid url.") %>',
number: '<%= __("This value should be a valid number.") %>',
integer: '<%= __("This value should be a valid integer.") %>',
digits: '<%= __("This value should be digits.") %>',
alphanum: '<%= __("This value should be alphanumeric.") %>'
},
notblank: '<%= __("This value should not be blank.") %>',
required: '<%= __("This value is required.") %>',
pattern: '<%= __("This value seems to be invalid.") %>',
min: '<%= __("This value should be greater than or equal to %s.") %>',
max: '<%= __("This value should be lower than or equal to %s.") %>',
range: '<%= __("This value should be between %s and %s.") %>',
minlength: '<%= __("This value is too short. It should have %s characters or more.") %>',
maxlength: '<%= __("This value is too long. It should have %s characters or fewer.") %>',
length: '<%= __("This value length is invalid. It should be between %s and %s characters long.") %>',
mincheck: '<%= __("You must select at least %s choices.") %>',
maxcheck: '<%= __("You must select %s choices or fewer.") %>',
check: '<%= __("You must select between %s and %s choices.") %>',
equalto: '<%= __("This value should be the same.") %>'
});
Parsley.setLocale('mailpoet');
</script>
<% block after_javascript %><% endblock %>