This commit is contained in:
emmymayo
2025-02-05 23:15:46 +01:00
commit 7269c99357
16995 changed files with 3389680 additions and 0 deletions
@@ -0,0 +1,124 @@
<?php
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Environment;
use MailPoetVendor\Twig\Error\LoaderError;
use MailPoetVendor\Twig\Error\RuntimeError;
use MailPoetVendor\Twig\Extension\CoreExtension;
use MailPoetVendor\Twig\Extension\SandboxExtension;
use MailPoetVendor\Twig\Markup;
use MailPoetVendor\Twig\Sandbox\SecurityError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedTagError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFilterError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFunctionError;
use MailPoetVendor\Twig\Source;
use MailPoetVendor\Twig\Template;
/* form/templatesLegacy/settings/date_types.hbs */
class __TwigTemplate_e09d68cf316097fd5135112267ebb032f67c0f65a0d93eb763abf51281c496ca extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
yield "<p class=\"clearfix\">
<label>";
// line 2
yield $this->extensions['MailPoet\Twig\I18n']->translate("Type of date");
yield "</label>
<select name=\"params[date_type]\">
";
// line 4
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["date_types"] ?? null));
foreach ($context['_seq'] as $context["type"] => $context["label"]) {
// line 5
yield " <option
{{#ifCond params.date_type \"==\" \"";
// line 6
yield $this->env->getRuntime('MailPoetVendor\Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
yield "\"}}
selected=\"selected\"
{{/ifCond}}
data-format=\"";
// line 9
yield $this->env->getRuntime('MailPoetVendor\Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_0 = (($__internal_compile_1 = ($context["date_formats"] ?? null)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1[$context["type"]] ?? null) : null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[0] ?? null) : null), "html", null, true);
yield "\" value=\"";
yield $this->env->getRuntime('MailPoetVendor\Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
yield "\"
>";
// line 10
yield $this->env->getRuntime('MailPoetVendor\Twig\Runtime\EscaperRuntime')->escape($context["label"], "html", null, true);
yield "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['type'], $context['label'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
yield " </select>
<input type=\"hidden\" name=\"params[date_format]\" value=\"\" />
</p>
<script type=\"text/javascript\">
jQuery(function(\$) {
\$('select[name=\"params[date_type]\"]').on('change', function() {
// set default date format depending on date type
\$('input[name=\"params[date_format]\"]')
.val(\$(this)
.find('option:selected')
.data('format'));
});
// set default format
\$('select[name=\"params[date_type]\"]').trigger('change');
});
<{{!}}/script>";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "form/templatesLegacy/settings/date_types.hbs";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 73 => 12, 65 => 10, 59 => 9, 53 => 6, 50 => 5, 46 => 4, 41 => 2, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "form/templatesLegacy/settings/date_types.hbs", "/home/circleci/mailpoet/mailpoet/views/form/templatesLegacy/settings/date_types.hbs");
}
}
@@ -0,0 +1,211 @@
<?php
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Environment;
use MailPoetVendor\Twig\Error\LoaderError;
use MailPoetVendor\Twig\Error\RuntimeError;
use MailPoetVendor\Twig\Extension\CoreExtension;
use MailPoetVendor\Twig\Extension\SandboxExtension;
use MailPoetVendor\Twig\Markup;
use MailPoetVendor\Twig\Sandbox\SecurityError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedTagError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFilterError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFunctionError;
use MailPoetVendor\Twig\Source;
use MailPoetVendor\Twig\Template;
/* form/templatesLegacy/settings/segment_selection.hbs */
class __TwigTemplate_a56b98597185bd94848e20889223b924a6c7613ed81a9303bb7a0ae266393ed5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
yield "<ul id=\"mailpoet_segment_selection\" class=\"clearfix\"></ul>
<div id=\"mailpoet_segment_available_container\">
<h3>";
// line 4
yield $this->extensions['MailPoet\Twig\I18n']->translate("Select the list that you want to add:");
yield "</h3>
<select class=\"mailpoet_segment_available\"></select>
<a href=\"javascript:;\" class=\"mailpoet_segment_add\"><span>";
// line 8
yield $this->extensions['MailPoet\Twig\I18n']->translate("Add");
yield "</span></a>
</div>
<script type=\"text/javascript\">
jQuery(function(\$) {
";
// line 13
yield " var selected_segments = {{#if params.values}}{{{ json_encode params.values }}}
{{else}}[]{{/if}};
";
// line 17
yield "
\$(function() {
mailpoet_segment_available_render();
mailpoet_segment_selection_render();
setInputNames();
// add segment
\$('.mailpoet_segment_add').on('click', function() {
// add currently selected segment to the selection
var selected_segment = \$('.mailpoet_segment_available :selected');
// add segment to selection
selected_segments.push({
id: selected_segment.val(),
name: selected_segment.text(),
is_checked: 0
});
// remove segment from available segments
selected_segment.remove();
// render selection
mailpoet_segment_selection_render();
setInputNames();
});
// remove segment
\$('#mailpoet_segment_selection').on('click', '.remove', function(e) {
if(\$('#mailpoet_segment_selection').children().length === 1) {
return e.preventDefault();
}
var element = \$(this).parents('li');
// remove currently selected segment to the selection
var selected_segment = parseInt(element.data('segment'), 10);
// remove segment from selection
selected_segments = selected_segments.filter(function(segment) {
return (parseInt(segment.id, 10) !== selected_segment);
});
// remove element
element.remove();
// render available segment
mailpoet_segment_available_render();
setInputNames();
});
});
function setupSortableSegments() {
// make segment selection sortable
Sortable.create('mailpoet_segment_selection', {
handles: \$\$('#mailpoet_segment_selection .handle'),
onChange: function(item) {
setInputNames();
}
});
}
function mailpoet_segment_available_render() {
// clear available segments
\$('.mailpoet_segment_available').html('');
var selected_segment_ids = selected_segments.map(function(segment) {
return segment.id;
});
// display available segments
\$.each(mailpoet_segments, function(i, segment) {
if(\$.inArray(segment.id, selected_segment_ids) < 0) {
\$('.mailpoet_segment_available').append(
'<option value=\"'+segment.id+'\">'+segment.name+'</option>'
);
}
});
mailpoet_segment_available_toggle();
}
function mailpoet_segment_selection_render() {
// segment item template
var template = Handlebars.compile(
\$('#field_settings_segment_selection_item').html()
);
// update view
\$('#mailpoet_segment_selection').html(
template({ segments: selected_segments })
);
mailpoet_segment_available_toggle();
}
function mailpoet_segment_available_toggle() {
// toggle visibility of available segments
if(\$('.mailpoet_segment_available option').length === 0) {
\$('#mailpoet_segment_available_container').hide();
} else {
\$('#mailpoet_segment_available_container').show();
}
}
function setInputNames() {
\$('#mailpoet_segment_selection li').each(function(index, item) {
\$(item).find('.mailpoet_is_checked').attr('name', 'params[values]['+index+'][is_checked]');
\$(item).find('.mailpoet_segment_id').attr('name', 'params[values]['+index+'][id]');
\$(item).find('.mailpoet_segment_name').attr('name', 'params[values]['+index+'][name]');
});
setupSortableSegments();
}
});
<{{!}}/script>
";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "form/templatesLegacy/settings/segment_selection.hbs";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 62 => 17, 58 => 13, 50 => 8, 43 => 4, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "form/templatesLegacy/settings/segment_selection.hbs", "/home/circleci/mailpoet/mailpoet/views/form/templatesLegacy/settings/segment_selection.hbs");
}
}
@@ -0,0 +1,85 @@
<?php
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Environment;
use MailPoetVendor\Twig\Error\LoaderError;
use MailPoetVendor\Twig\Error\RuntimeError;
use MailPoetVendor\Twig\Extension\CoreExtension;
use MailPoetVendor\Twig\Extension\SandboxExtension;
use MailPoetVendor\Twig\Markup;
use MailPoetVendor\Twig\Sandbox\SecurityError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedTagError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFilterError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFunctionError;
use MailPoetVendor\Twig\Source;
use MailPoetVendor\Twig\Template;
/* newsletter/templates/blocks/abandonedCartContent/settings.hbs */
class __TwigTemplate_fa065697f25afa3f448331ec5feeaeff06376f390132a244e352df6f05279716 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
yield "<h3>";
yield $this->extensions['MailPoet\Twig\I18n']->translate("Display options");
yield "</h3>
<div class=\"mailpoet_settings_abandoned_cart_content_display_options\"></div>
<div class=\"mailpoet_settings_abandoned_cart_content_controls\">
<div class=\"mailpoet_form_field\">
<input type=\"button\" class=\"button button-primary mailpoet_done_editing\" value=\"";
// line 5
yield $this->env->getRuntime('MailPoetVendor\Twig\Runtime\EscaperRuntime')->escape($this->extensions['MailPoet\Twig\I18n']->translate("Done"), "html_attr");
yield "\" />
</div>
</div>
";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "newsletter/templates/blocks/abandonedCartContent/settings.hbs";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 46 => 5, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "newsletter/templates/blocks/abandonedCartContent/settings.hbs", "/home/circleci/mailpoet/mailpoet/views/newsletter/templates/blocks/abandonedCartContent/settings.hbs");
}
}
@@ -0,0 +1,157 @@
<?php
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Environment;
use MailPoetVendor\Twig\Error\LoaderError;
use MailPoetVendor\Twig\Error\RuntimeError;
use MailPoetVendor\Twig\Extension\CoreExtension;
use MailPoetVendor\Twig\Extension\SandboxExtension;
use MailPoetVendor\Twig\Markup;
use MailPoetVendor\Twig\Sandbox\SecurityError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedTagError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFilterError;
use MailPoetVendor\Twig\Sandbox\SecurityNotAllowedFunctionError;
use MailPoetVendor\Twig\Source;
use MailPoetVendor\Twig\Template;
/* form/templatesLegacy/settings/values.hbs */
class __TwigTemplate_5af51a553427d7a127e75e710a4e59d5d16e4cc2ee6ba16444fb674882c9e0e7 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
yield "<div class=\"mailpoet_multiple_values\">
<ul></ul>
{{#ifCond type 'in' 'radio,select'}}
<a href=\"javascript:;\" class=\"add\"><span></span>";
// line 4
yield $this->extensions['MailPoet\Twig\I18n']->translate("Add item");
yield "</a>
{{/ifCond}}
</div>
<script type=\"text/javascript\">
jQuery(function(\$) {
{{#if params.values}}
var field_values = {{{ json_encode params.values }}};
{{else}}
var field_values = [{ value: '' }];
{{/if}}
var field_type = \"{{ type }}\";
var template = Handlebars.compile(\$('#field_settings_values_item').html());
// set default value for checkbox type if there is no value defined
if(field_type === 'checkbox' && field_values.length !== 1) {
if(field_values.length > 1) {
field_values = [field_values[0]];
} else {
// push a default empty value
field_values = [{}];
}
}
\$(function() {
// render all values by creating inputs
for(var i = 0, count = field_values.length; i < count; i++) {
createInput(template, field_values[i]);
}
// set inputs name
setInputNames();
// add value
\$('.mailpoet_multiple_values .add').on('click', function() {
createInput(template);
setInputNames();
});
// remove value
\$(document).on('click', '.mailpoet_multiple_values li .remove', function() {
\$(this).parent('li').remove();
setInputNames();
});
// create an input
function createInput(template, values) {
var data = values || {};
// set field type
data.type = field_type;
// add input to selection
\$('.mailpoet_multiple_values ul').append(template(data));
}
// set input names (since their index is based on their position)
function setInputNames() {
\$('.mailpoet_multiple_values li').each(function(index, item) {
\$(item).find('.is_checked').attr('name', 'params[values]['+index+'][is_checked]');
\$(item).find('.value').attr('name', 'params[values]['+index+'][value]');
});
// hide remove button if only one item remains
if (\$('.mailpoet_multiple_values li').length > 1) {
\$('.mailpoet_multiple_values .remove').show();
} else {
\$('.mailpoet_multiple_values .remove').hide();
}
}
{{#ifCond type '!=' 'checkbox'}}
\$('.mailpoet_multiple_values').on('click', '.is_checked', function() {
// get click checkbox's state
var is_checked = \$(this).is(':checked');
// uncheck all checkboxes
\$('.mailpoet_multiple_values .is_checked').removeProp('checked');
// toggle clicked checkbox
if(is_checked === false) {
\$(this).removeProp('checked');
} else {
\$(this).prop('checked', 'checked');
}
});
{{/ifCond}}
});
});
<{{!}}/script>";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "form/templatesLegacy/settings/values.hbs";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 43 => 4, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "form/templatesLegacy/settings/values.hbs", "/home/circleci/mailpoet/mailpoet/views/form/templatesLegacy/settings/values.hbs");
}
}
@@ -0,0 +1 @@
<?php