Files
piratepoet/views/settings/advanced.html

421 lines
14 KiB
HTML

<table class="form-table">
<tbody>
<!-- bounce email -->
<tr>
<th scope="row">
<label for="settings[bounce_email]">
<%= __('Bounce email address') %>
</label>
<p class="description">
<%= __('Your bounced emails will be sent to this address.') %>
<a href="https://kb.mailpoet.com/article/180-how-bounce-management-works-in-mailpoet-3"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
<td>
<p>
<input type="text"
id="settings[bounce_email]"
name="bounce[address]"
data-automation-id="bounce-address-field"
value="<%= settings.bounce.address %>"
placeholder="bounce@mydomain.com"
/>
</p>
</td>
</tr>
<!-- task scheduler -->
<tr>
<th scope="row">
<label>
<%= __('Newsletter task scheduler (cron)') %>
</label>
<p class="description">
<%= __('Select what will activate your newsletter queue.') %>
<a href="https://kb.mailpoet.com/article/129-what-is-the-newsletter-task-scheduler"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
<td>
<p>
<label>
<input
type="radio"
name="cron_trigger[method]"
value="<%= cron_trigger.wordpress %>"
data-automation-id="wordress_cron_radio"
<% if (settings.cron_trigger.method == cron_trigger.wordpress) %>
checked="checked"
<% endif %>
/><%= __('Visitors to your website (recommended)') %>
</label>
</p>
<p>
<label>
<input
type="radio"
name="cron_trigger[method]"
value="<%= cron_trigger.mailpoet %>"
data-automation-id="mailpoet_cron_radio"
<% if (settings.cron_trigger.method == cron_trigger.mailpoet) %>
checked="checked"
<% endif %>
/><%= __("MailPoet's own script. Doesn't work with [link]these hosts[/link].")
|replaceLinkTags('https://kb.mailpoet.com/article/131-hosts-which-mailpoet-task-scheduler-wont-work', {'target' : '_blank'})
|raw
%>
</label>
</p>
<p>
<label>
<input
type="radio"
name="cron_trigger[method]"
value="<%= cron_trigger.linux_cron %>"
data-automation-id="linux_cron_radio"
<% if (settings.cron_trigger.method == cron_trigger.linux_cron) %>
checked="checked"
<% endif %>
/><%= __("Server side cron (Linux cron)")
%>
</label>
</p>
<div id="settings_linux_cron">
<p>
<%= __("To use this option please add this command to your crontab:") %><br>
<input
value="php <%= linux_cron_path %>/mailpoet-cron.php <%= ABSPATH %>"
class="large-text"
readonly
/>
<p>
<%= __("With the frequency of running it every minute:") %><br>
<input
value="*/1 * * * *"
class="large-text"
readonly
/>
</div>
</td>
</tr>
<!-- roles and capabilities -->
<tr>
<th scope="row">
<%= __('Roles and capabilities') %>
<p class="description">
<%= __('Manage which WordPress roles access which features of MailPoet.') %>
</p>
</th>
<td>
<% if (members_plugin_active) %>
<p>
<a href="<%= admin_url('users.php?page=roles') %>"><%= __('Manage using the Members plugin') %></a>
</p>
<% else %>
<%= __('Install the plugin [link]Members[/link] (free) to manage permissions.')
|replaceLinkTags('https://wordpress.org/plugins/members/', {'target' : '_blank'})
|raw
%>
<% endif %>
</td>
</tr>
<!-- link tracking -->
<tr>
<th scope="row">
<label>
<%= __('Open and click tracking') %>
</label>
<p class="description">
<%= __('Enable or disable open and click tracking.') %>
</p>
</th>
<td>
<p>
<label>
<input
type="radio"
name="tracking[enabled]"
data-automation-id="tracking-enabled-radio"
value="1"
<% if(settings.tracking.enabled) %>
checked="checked"
<% endif %>
/><%= __('Yes') %>
</label>
&nbsp;
<label>
<input
type="radio"
name="tracking[enabled]"
data-automation-id="tracking-disabled-radio"
value=""
<% if not(settings.tracking.enabled) %>
checked="checked"
<% endif %>
/><%= __('No') %>
</label>
</p>
</td>
</tr>
<!-- inactive subscribers -->
<tr>
<th scope="row">
<label>
<%= __('Stop sending to inactive subscribers') %>
</label>
<p class="description">
<%= __("Gmail, Yahoo and other email providers will treat your emails like spam if your subscribers don't open your emails in the long run. This option will mark your subscribers as Inactive and MailPoet will stop sending to them.") %>
<a href="https://kb.mailpoet.com/article/264-inactive-subscribers"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
<td
class="mailpoet_inactive_subscribers_disabled<% if (settings.tracking.enabled) %> mailpoet_hidden<% endif %>"
data-automation-id="inactive-subscribers-disabled"
>
<p><i><%= __('This option is disabled because tracking is disabled.') %></i></p>
</td>
<td
class="mailpoet_inactive_subscribers_enabled<% if not(settings.tracking.enabled) %> mailpoet_hidden<% endif %>"
data-automation-id="inactive-subscribers-enabled"
>
<p>
<label>
<input
type="radio"
name="deactivate_subscriber_after_inactive_days"
value=""
data-automation-id="inactive-subscribers-option-never"
<% if not(settings.deactivate_subscriber_after_inactive_days) %>checked="checked"<% endif %>
/><%= __('Never') %>
</label>
</p>
<p>
<label>
<input
type="radio"
name="deactivate_subscriber_after_inactive_days"
value="90"
<% if (settings.deactivate_subscriber_after_inactive_days == 90) %>checked="checked"<% endif %>
/><%= __('After 3 months (recommended if you send once a day)') %>
</label>
</p>
<p>
<label>
<input
type="radio"
name="deactivate_subscriber_after_inactive_days"
value="180"
data-automation-id="inactive-subscribers-default"
<% if (settings.deactivate_subscriber_after_inactive_days == 180) %>checked="checked"<% endif %>
/><%= __('After 6 months (default, recommended if you send at least once a month)')%>
</label>
</p>
<p>
<label>
<input
type="radio"
name="deactivate_subscriber_after_inactive_days"
value="365"
<% if (settings.deactivate_subscriber_after_inactive_days == 365) %>checked="checked"<% endif %>
/><%= __('After 12 months') %>
</label>
</p>
</td>
</tr>
<!-- share anonymous data? -->
<tr>
<th scope="row">
<label>
<%= __('Share anonymous data') %>
</label>
<p class="description">
<%= __('Share anonymous data and help us improve the plugin. We appreciate your help!') %>
<a
href="https://kb.mailpoet.com/article/130-sharing-your-data-with-us"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
<td>
<p>
<label>
<input
type="radio"
name="analytics[enabled]"
data-automation-id="analytics-yes"
value="1"
<% if(settings.analytics.enabled) %>
checked="checked"
<% endif %>
/><%= __('Yes') %>
</label>
&nbsp;
<label>
<input
type="radio"
name="analytics[enabled]"
data-automation-id="analytics-no"
value=""
<% if not(settings.analytics.enabled) %>
checked="checked"
<% endif %>
/><%= __('No') %>
</label>
</p>
</td>
</tr>
<!-- captcha settings -->
<tr>
<th scope="row">
<label>
<%= __('Protect your forms against spam signups') %>
</label>
<p class="description">
<%= __('Built-in captcha protects your subscription forms after a second signup attempt by a bot. Alternatively, use reCAPTCHA by Google.') %>
<a
href="https://www.google.com/recaptcha/admin"
target="_blank"
><%= __('Sign up for an API key pair here.') %></a>
</p>
</th>
<td>
<p>
<label>
<input
type="radio"
name="captcha[type]"
value="built-in"
<% if(not(built_in_captcha_supported)) %>
disabled="disabled"
<% endif %>
<% if(settings.captcha.type == 'built-in') %>
checked="checked"
<% endif %>
/><%= __('Built-in captcha (default)') %>
<% if(not(built_in_captcha_supported)) %>
<%= __('(disabled because GD or FreeType extension is missing)') %>
<% endif %>
</label>
<input type="hidden" name="subscription[pages][captcha]" value="<%= settings.subscription.pages.captcha %>" />
</p>
<p>
<label>
<input
type="radio"
name="captcha[type]"
value="recaptcha"
<% if(settings.captcha.type == 'recaptcha') %>
checked="checked"
<% endif %>
/><%= __('Google reCAPTCHA') %>
</label>
</p>
<div id="settings_recaptcha_tokens">
<p>
<input type="text"
name="captcha[recaptcha_site_token]"
value="<%= settings.captcha.recaptcha_site_token %>"
placeholder="<%= __('Your reCAPTCHA Site Key') %>"
class="regular-text"
/>
</p>
<p>
<input type="text"
name="captcha[recaptcha_secret_token]"
value="<%= settings.captcha.recaptcha_secret_token %>"
placeholder="<%= __('Your reCAPTCHA Secret Key') %>"
class="regular-text"
/>
</p>
<div id="settings_recaptcha_tokens_error" class="mailpoet_error_item mailpoet_error">
<%= __('Please fill the reCAPTCHA keys.') %>
</div>
</div>
<p>
<label>
<input
type="radio"
name="captcha[type]"
value=""
<% if not(settings.captcha.type) %>
checked="checked"
<% endif %>
/><%= __('Disable') %>
</label>
</p>
</td>
</tr>
<!-- reinstall -->
<tr>
<th scope="row">
<label><%= __('Reinstall from scratch') %></label>
<p class="description">
<%= __('Want to start from the beginning? This will completely delete MailPoet and reinstall it from scratch. Remember: you will lose all of your data!') %>
</p>
</th>
<td>
<p>
<a
id="mailpoet_reinstall"
class="button"
href="javascript:;"><%= __('Reinstall now...') %></a>
</p>
</td>
</tr>
<!-- logging -->
<tr>
<th scope="row">
<label><%= __('Logging') %></label>
<p class="description">
<%= __('Enables logging for diagnostics of plugin behavior.') %>
<td>
<select
name="logging"
data-automation-id="logging-select-box"
>
<option
value="everything"
data-automation-id="log-everything"
<% if settings.logging == "everything" %>
selected
<% endif %>
><%= _x('Everything', 'In settings: "Logging: Everything"') %>
<option
value="errors"
data-automation-id="log-errors"
<% if settings.logging != "nothing" and settings.logging != "everything" %>
selected
<% endif %>
><%= _x('Errors only', 'In settings: "Logging: Errors only"') %>
<option
value="nothing"
data-automation-id="log-nothing"
<% if settings.logging == "nothing" %>
selected
<% endif %>
><%= _x('Nothing', 'In settings: "Logging: Nothing"') %>
</select>
</tbody>
</table>
<script type="text/javascript">
jQuery(function($) {
$(function() {
$('input[name="tracking[enabled]"]').on('change', function() {
var trackingEnabled = $(this).val();
if (trackingEnabled) {
$('.mailpoet_inactive_subscribers_enabled').removeClass('mailpoet_hidden');
$('.mailpoet_inactive_subscribers_disabled').addClass('mailpoet_hidden');
} else {
$('.mailpoet_inactive_subscribers_enabled').addClass('mailpoet_hidden');
$('.mailpoet_inactive_subscribers_disabled').removeClass('mailpoet_hidden');
}
});
});
});
</script>