131 lines
5.6 KiB
HTML
131 lines
5.6 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>
|
|
<div id="mailpoet_confirm_alert_holder"></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>
|
|
|
|
<!-- 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_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 %>;
|
|
// 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,})))/;
|
|
</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'),
|
|
}) %>
|
|
<% block translations %><% endblock %>
|
|
|
|
<% block after_translations %><% endblock %>
|
|
|
|
<%= javascript(
|
|
'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 = 'dd918048-8d73-11e7-b5b5-0ec85169275a' %>
|
|
<%if has_valid_premium_key %>
|
|
<% set helpscout_form_id = '6974b88d-8d85-11e7-b5b5-0ec85169275a' %>
|
|
<% elseif mailpoet_installed_in_last_two_weeks() %>
|
|
<% set helpscout_form_id = '7c02abfe-8453-11e8-8d65-0ee9bb0328ce' %>
|
|
<% endif %>
|
|
<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!0,baseUrl:"https://mailpoet3.helpscoutdocs.com/"},contact:{enabled:!0,formId:"<%= helpscout_form_id %>"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});</script>
|
|
|
|
<script type="text/javascript">
|
|
if(window['HS'] !== undefined) {
|
|
// HelpScout Beacon: Configuration
|
|
HS.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
|
|
HS.beacon.ready(function() {
|
|
HS.beacon.identify(
|
|
<%= json_encode(get_helpscout_data()) %>
|
|
);
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<% if has_valid_premium_key == false and mailpoet_installed_in_last_two_weeks() %>
|
|
<script type="text/javascript" async>;(function(o,l,a,r,k,y){if(o.olark)return;r="script";y=l.createElement(r);r=l.getElementsByTagName(r)[0];y.async=1;y.src="//"+a;r.parentNode.insertBefore(y,r);y=o.olark=function(){k.s.push(arguments);k.t.push(+new Date)};y.extend=function(i,j){y("extend",i,j)};y.identify=function(i){y("identify",k.i=i)};y.configure=function(i,j){y("configure",i,j);k.c[i]=j};k=y._={s:[],t:[+new Date],c:{},l:a};})(window,document,"static.olark.com/jsclient/loader.js");olark.identify('2129-842-10-9194');</script>
|
|
|
|
<script type="text/javascript">
|
|
// we want to display Olark instead of HS beacon only if a supporter is active on Olark
|
|
// (this means that HS beacon is always initialized and Olark can replace it anytime)
|
|
olark('api.box.onShow', function() {
|
|
jQuery('#hs-beacon')
|
|
.addClass('hs-beacon-hidden')
|
|
.hide();
|
|
});
|
|
</script>
|
|
<% endif %>
|
|
|
|
<script>
|
|
// SatisMeter for tracking NPS score
|
|
(function() { window.satismeter = window.satismeter || function() {(window.satismeter.q = window.satismeter.q || []).push(arguments);};window.satismeter.l = 1 * new Date();var script = document.createElement("script");var parent = document.getElementsByTagName("script")[0].parentNode;script.async = 1;script.src = "https://app.satismeter.com/satismeter.js";parent.appendChild(script);})();
|
|
</script>
|
|
<% block after_javascript %><% endblock %>
|