Add form Template 6
[MAILPOET-3074]
This commit is contained in:
committed by
Veljko V
parent
693bee7abe
commit
a42e97d900
@ -20,6 +20,11 @@ use MailPoet\Form\Templates\Templates\Template4FixedBar;
|
|||||||
use MailPoet\Form\Templates\Templates\Template4Popup;
|
use MailPoet\Form\Templates\Templates\Template4Popup;
|
||||||
use MailPoet\Form\Templates\Templates\Template4SlideIn;
|
use MailPoet\Form\Templates\Templates\Template4SlideIn;
|
||||||
use MailPoet\Form\Templates\Templates\Template4Widget;
|
use MailPoet\Form\Templates\Templates\Template4Widget;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6BelowPages;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6FixedBar;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6Popup;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6SlideIn;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6Widget;
|
||||||
use MailPoet\Form\Util\CustomFonts;
|
use MailPoet\Form\Util\CustomFonts;
|
||||||
use MailPoet\Form\Util\Export;
|
use MailPoet\Form\Util\Export;
|
||||||
use MailPoet\Models\Form;
|
use MailPoet\Models\Form;
|
||||||
@ -68,6 +73,11 @@ class FormEditor {
|
|||||||
Template4Popup::ID,
|
Template4Popup::ID,
|
||||||
Template4SlideIn::ID ,
|
Template4SlideIn::ID ,
|
||||||
Template4Widget::ID,
|
Template4Widget::ID,
|
||||||
|
Template6BelowPages::ID,
|
||||||
|
Template6FixedBar::ID,
|
||||||
|
Template6Popup::ID,
|
||||||
|
Template6SlideIn::ID ,
|
||||||
|
Template6Widget::ID,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
@ -14,6 +14,11 @@ use MailPoet\Form\Templates\Templates\Template4FixedBar;
|
|||||||
use MailPoet\Form\Templates\Templates\Template4Popup;
|
use MailPoet\Form\Templates\Templates\Template4Popup;
|
||||||
use MailPoet\Form\Templates\Templates\Template4SlideIn;
|
use MailPoet\Form\Templates\Templates\Template4SlideIn;
|
||||||
use MailPoet\Form\Templates\Templates\Template4Widget;
|
use MailPoet\Form\Templates\Templates\Template4Widget;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6BelowPages;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6FixedBar;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6Popup;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6SlideIn;
|
||||||
|
use MailPoet\Form\Templates\Templates\Template6Widget;
|
||||||
use MailPoet\UnexpectedValueException;
|
use MailPoet\UnexpectedValueException;
|
||||||
|
|
||||||
class TemplateRepository {
|
class TemplateRepository {
|
||||||
@ -33,6 +38,11 @@ class TemplateRepository {
|
|||||||
Template4Popup::ID => Template4Popup::class,
|
Template4Popup::ID => Template4Popup::class,
|
||||||
Template4SlideIn::ID => Template4SlideIn::class,
|
Template4SlideIn::ID => Template4SlideIn::class,
|
||||||
Template4Widget::ID => Template4Widget::class,
|
Template4Widget::ID => Template4Widget::class,
|
||||||
|
Template6BelowPages::ID => Template6BelowPages::class,
|
||||||
|
Template6FixedBar::ID => Template6FixedBar::class,
|
||||||
|
Template6Popup::ID => Template6Popup::class,
|
||||||
|
Template6SlideIn::ID => Template6SlideIn::class,
|
||||||
|
Template6Widget::ID => Template6Widget::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getFormTemplate(string $templateId): FormTemplate {
|
public function getFormTemplate(string $templateId): FormTemplate {
|
||||||
|
@ -8,7 +8,7 @@ class Template4BelowPages extends FormTemplate {
|
|||||||
const ID = 'template_4_below_pages';
|
const ID = 'template_4_below_pages';
|
||||||
|
|
||||||
public function getName(): string {
|
public function getName(): string {
|
||||||
return 'Template 4 BelowPages';
|
return 'Template 4 Below Pages';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBody(): array {
|
public function getBody(): array {
|
||||||
|
307
lib/Form/Templates/Templates/Template6BelowPages.php
Normal file
307
lib/Form/Templates/Templates/Template6BelowPages.php
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MailPoet\Form\Templates\Templates;
|
||||||
|
|
||||||
|
use MailPoet\Form\Templates\FormTemplate;
|
||||||
|
|
||||||
|
class Template6BelowPages extends FormTemplate {
|
||||||
|
const ID = 'template_6_below_pages';
|
||||||
|
|
||||||
|
public function getName(): string {
|
||||||
|
return 'Template 6 Below Pages';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBody(): array {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Dive in!</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '44',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '20',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'columns',
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'width' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'width' => '40',
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'text',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Insert your email address', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
'required' => '1',
|
||||||
|
'label_within' => '1',
|
||||||
|
],
|
||||||
|
'id' => 'email',
|
||||||
|
'name' => 'Email',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '0',
|
||||||
|
'background_color' => '#f8fbff',
|
||||||
|
'font_color' => '#38527a',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'width' => '40',
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'submit',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
'id' => 'submit',
|
||||||
|
'name' => 'Submit',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '1',
|
||||||
|
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||||
|
'font_size' => '16',
|
||||||
|
'font_color' => '#ffffff',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'width' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'params' => [
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
'text_color' => '',
|
||||||
|
'background_color' => '',
|
||||||
|
'gradient' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'paragraph',
|
||||||
|
'id' => 'paragraph',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">We promise we\'ll never spam! Take a look at our <a href="https://www.mailpoet.com/privacy-notice/">Privacy Policy</a> for more info.</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'drop_cap' => '0',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '14',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'background_color' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSettings(): array {
|
||||||
|
return [
|
||||||
|
'success_message' => '',
|
||||||
|
'segments' => [],
|
||||||
|
'alignment' => 'left',
|
||||||
|
'fontSize' => '16',
|
||||||
|
'form_placement_slide_in_enabled' => '',
|
||||||
|
'form_placement_fixed_bar_enabled' => '',
|
||||||
|
'form_placement_popup_enabled' => '',
|
||||||
|
'form_placement_bellow_posts_enabled' => '1',
|
||||||
|
'place_form_bellow_all_pages' => '',
|
||||||
|
'place_form_bellow_all_posts' => '',
|
||||||
|
'place_popup_form_on_all_pages' => '',
|
||||||
|
'place_popup_form_on_all_posts' => '',
|
||||||
|
'popup_form_delay' => '15',
|
||||||
|
'place_fixed_bar_form_on_all_pages' => '',
|
||||||
|
'place_fixed_bar_form_on_all_posts' => '',
|
||||||
|
'fixed_bar_form_delay' => '15',
|
||||||
|
'fixed_bar_form_position' => 'top',
|
||||||
|
'place_slide_in_form_on_all_pages' => '',
|
||||||
|
'place_slide_in_form_on_all_posts' => '',
|
||||||
|
'slide_in_form_delay' => '15',
|
||||||
|
'slide_in_form_position' => 'right',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'border_size' => '0',
|
||||||
|
'form_padding' => '35',
|
||||||
|
'input_padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
'background_image_url' => 'http://mailpoet.info/wp-content/uploads/2020/07/form-bg.jpg',
|
||||||
|
'background_image_display' => 'scale',
|
||||||
|
'close_button' => 'classic',
|
||||||
|
'below_post_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'slide_in_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixed_bar_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'popup_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'other_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'segments_selected_by' => 'admin',
|
||||||
|
'fontColor' => '#ffffff',
|
||||||
|
'backgroundColor' => '#ffffff',
|
||||||
|
'success_validation_color' => '#00d084',
|
||||||
|
'error_validation_color' => '#cf2e2e',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStyles(): string {
|
||||||
|
return <<<EOL
|
||||||
|
/* form */
|
||||||
|
.mailpoet_form {
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.mailpoet_form_paragraph.last {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2.mailpoet-heading {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* columns */
|
||||||
|
.mailpoet_column_with_background {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* space between columns */
|
||||||
|
.mailpoet_form_column:not(:first-child) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* input wrapper (label + input) */
|
||||||
|
.mailpoet_paragraph {
|
||||||
|
line-height:20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* labels */
|
||||||
|
.mailpoet_segment_label,
|
||||||
|
.mailpoet_text_label,
|
||||||
|
.mailpoet_textarea_label,
|
||||||
|
.mailpoet_select_label,
|
||||||
|
.mailpoet_radio_label,
|
||||||
|
.mailpoet_checkbox_label,
|
||||||
|
.mailpoet_list_label,
|
||||||
|
.mailpoet_date_label {
|
||||||
|
display:block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inputs */
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea,
|
||||||
|
.mailpoet_select,
|
||||||
|
.mailpoet_date_month,
|
||||||
|
.mailpoet_date_day,
|
||||||
|
.mailpoet_date_year,
|
||||||
|
.mailpoet_date {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_checkbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_submit {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_divider {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_message {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading {
|
||||||
|
width: 30px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading > span {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #5b5b5b;
|
||||||
|
}
|
||||||
|
EOL;
|
||||||
|
}
|
||||||
|
}
|
297
lib/Form/Templates/Templates/Template6FixedBar.php
Normal file
297
lib/Form/Templates/Templates/Template6FixedBar.php
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MailPoet\Form\Templates\Templates;
|
||||||
|
|
||||||
|
use MailPoet\Form\Templates\FormTemplate;
|
||||||
|
|
||||||
|
class Template6FixedBar extends FormTemplate {
|
||||||
|
const ID = 'template_6_fixed_bar';
|
||||||
|
|
||||||
|
public function getName(): string {
|
||||||
|
return 'Template 6 Fixed Bar';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBody(): array {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'type' => 'divider',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'height' => '1',
|
||||||
|
'type' => 'spacer',
|
||||||
|
'style' => 'solid',
|
||||||
|
'divider_height' => '1',
|
||||||
|
'divider_width' => '100',
|
||||||
|
'color' => 'black',
|
||||||
|
],
|
||||||
|
'id' => 'divider',
|
||||||
|
'name' => 'Divider',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'columns',
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => 'center',
|
||||||
|
'width' => '50',
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Dive in!</strong> Start your journey today.</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'left',
|
||||||
|
'font_size' => '27',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'paragraph',
|
||||||
|
'id' => 'paragraph',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">Sign up to start your fitness program. We promise we\'ll never spam! Take a look at our <a href="https://www.mailpoet.com/privacy-notice/">Privacy Policy</a> for more info.</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'drop_cap' => '0',
|
||||||
|
'align' => 'left',
|
||||||
|
'font_size' => '14',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'background_color' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => 'center',
|
||||||
|
'width' => '25',
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'text',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Insert your email address', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
'required' => '1',
|
||||||
|
'label_within' => '1',
|
||||||
|
],
|
||||||
|
'id' => 'email',
|
||||||
|
'name' => 'Email',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '0',
|
||||||
|
'background_color' => '#f8fbff',
|
||||||
|
'font_color' => '#38527a',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'column',
|
||||||
|
'params' => [
|
||||||
|
'class_name' => '',
|
||||||
|
'vertical_alignment' => 'center',
|
||||||
|
'width' => '25',
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
[
|
||||||
|
'type' => 'submit',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
'id' => 'submit',
|
||||||
|
'name' => 'Submit',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '1',
|
||||||
|
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||||
|
'font_size' => '19',
|
||||||
|
'font_color' => '#ffffff',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'params' => [
|
||||||
|
'vertical_alignment' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
'text_color' => '',
|
||||||
|
'background_color' => '',
|
||||||
|
'gradient' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSettings(): array {
|
||||||
|
return [
|
||||||
|
'success_message' => '',
|
||||||
|
'segments' => [],
|
||||||
|
'alignment' => 'left',
|
||||||
|
'fontSize' => '16',
|
||||||
|
'form_placement_slide_in_enabled' => '',
|
||||||
|
'form_placement_fixed_bar_enabled' => '1',
|
||||||
|
'form_placement_popup_enabled' => '',
|
||||||
|
'form_placement_bellow_posts_enabled' => '',
|
||||||
|
'place_form_bellow_all_pages' => '',
|
||||||
|
'place_form_bellow_all_posts' => '',
|
||||||
|
'place_popup_form_on_all_pages' => '',
|
||||||
|
'place_popup_form_on_all_posts' => '',
|
||||||
|
'popup_form_delay' => '15',
|
||||||
|
'place_fixed_bar_form_on_all_pages' => '',
|
||||||
|
'place_fixed_bar_form_on_all_posts' => '',
|
||||||
|
'fixed_bar_form_delay' => '0',
|
||||||
|
'fixed_bar_form_position' => 'top',
|
||||||
|
'place_slide_in_form_on_all_pages' => '',
|
||||||
|
'place_slide_in_form_on_all_posts' => '',
|
||||||
|
'slide_in_form_delay' => '15',
|
||||||
|
'slide_in_form_position' => 'right',
|
||||||
|
'border_radius' => '0',
|
||||||
|
'border_size' => '0',
|
||||||
|
'form_padding' => '0',
|
||||||
|
'input_padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
'background_image_url' => 'http://mailpoet.info/wp-content/uploads/2020/07/form-bg.jpg',
|
||||||
|
'background_image_display' => 'scale',
|
||||||
|
'close_button' => 'classic',
|
||||||
|
'below_post_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'slide_in_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixed_bar_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '1100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'popup_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'other_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'segments_selected_by' => 'admin',
|
||||||
|
'success_validation_color' => '#00d084',
|
||||||
|
'error_validation_color' => '#cf2e2e',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStyles(): string {
|
||||||
|
return <<<EOL
|
||||||
|
/* form */
|
||||||
|
.mailpoet_form {
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.mailpoet_form_paragraph.last {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* columns */
|
||||||
|
.mailpoet_column_with_background {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* space between columns */
|
||||||
|
.mailpoet_form_column:not(:first-child) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* input wrapper (label + input) */
|
||||||
|
.mailpoet_paragraph {
|
||||||
|
line-height:20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* labels */
|
||||||
|
.mailpoet_segment_label,
|
||||||
|
.mailpoet_text_label,
|
||||||
|
.mailpoet_textarea_label,
|
||||||
|
.mailpoet_select_label,
|
||||||
|
.mailpoet_radio_label,
|
||||||
|
.mailpoet_checkbox_label,
|
||||||
|
.mailpoet_list_label,
|
||||||
|
.mailpoet_date_label {
|
||||||
|
display:block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inputs */
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea,
|
||||||
|
.mailpoet_select,
|
||||||
|
.mailpoet_date_month,
|
||||||
|
.mailpoet_date_day,
|
||||||
|
.mailpoet_date_year,
|
||||||
|
.mailpoet_date {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_checkbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_submit {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_divider {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_message {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading {
|
||||||
|
width: 30px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading > span {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #5b5b5b;
|
||||||
|
}
|
||||||
|
h2.mailpoet-heading {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
EOL;
|
||||||
|
}
|
||||||
|
}
|
258
lib/Form/Templates/Templates/Template6Popup.php
Normal file
258
lib/Form/Templates/Templates/Template6Popup.php
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MailPoet\Form\Templates\Templates;
|
||||||
|
|
||||||
|
use MailPoet\Form\Templates\FormTemplate;
|
||||||
|
|
||||||
|
class Template6Popup extends FormTemplate {
|
||||||
|
const ID = 'template_6__popup';
|
||||||
|
|
||||||
|
public function getName(): string {
|
||||||
|
return 'Template 6 Popup';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBody(): array {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Dive in!</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '72',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">Join </span>[mailpoet_subscribers_count] others, and start your fitness journey with us today.</strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '20',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'text',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Insert your email address', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
'required' => '1',
|
||||||
|
'label_within' => '1',
|
||||||
|
],
|
||||||
|
'id' => 'email',
|
||||||
|
'name' => 'Email',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '0',
|
||||||
|
'background_color' => '#f8fbff',
|
||||||
|
'font_color' => '#38527a',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'border_color' => '#38527a',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'submit',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
'id' => 'submit',
|
||||||
|
'name' => 'Submit',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '1',
|
||||||
|
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||||
|
'font_size' => '19',
|
||||||
|
'font_color' => '#ffffff',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'padding' => '16',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'paragraph',
|
||||||
|
'id' => 'paragraph',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>We promise we\'ll never spam! Take a look at our <a href="https://www.mailpoet.com/privacy-notice/">Privacy Policy </a>for more info.</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'drop_cap' => '0',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '14',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'background_color' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSettings(): array {
|
||||||
|
return [
|
||||||
|
'success_message' => '',
|
||||||
|
'segments' => [],
|
||||||
|
'alignment' => 'left',
|
||||||
|
'fontSize' => '16',
|
||||||
|
'form_placement_slide_in_enabled' => '',
|
||||||
|
'form_placement_fixed_bar_enabled' => '',
|
||||||
|
'form_placement_popup_enabled' => '1',
|
||||||
|
'form_placement_bellow_posts_enabled' => '',
|
||||||
|
'place_form_bellow_all_pages' => '',
|
||||||
|
'place_form_bellow_all_posts' => '',
|
||||||
|
'place_popup_form_on_all_pages' => '',
|
||||||
|
'place_popup_form_on_all_posts' => '',
|
||||||
|
'popup_form_delay' => '0',
|
||||||
|
'place_fixed_bar_form_on_all_pages' => '',
|
||||||
|
'place_fixed_bar_form_on_all_posts' => '',
|
||||||
|
'fixed_bar_form_delay' => '15',
|
||||||
|
'fixed_bar_form_position' => 'top',
|
||||||
|
'place_slide_in_form_on_all_pages' => '',
|
||||||
|
'place_slide_in_form_on_all_posts' => '',
|
||||||
|
'slide_in_form_delay' => '15',
|
||||||
|
'slide_in_form_position' => 'right',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'border_size' => '0',
|
||||||
|
'form_padding' => '35',
|
||||||
|
'input_padding' => '16',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
'background_image_url' => 'http://mailpoet.info/wp-content/uploads/2020/07/form-bg.jpg',
|
||||||
|
'background_image_display' => 'scale',
|
||||||
|
'close_button' => 'classic',
|
||||||
|
'below_post_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'slide_in_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixed_bar_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'popup_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '440',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'other_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'segments_selected_by' => 'admin',
|
||||||
|
'success_validation_color' => '#00d084',
|
||||||
|
'error_validation_color' => '#cf2e2e',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStyles(): string {
|
||||||
|
return <<<EOL
|
||||||
|
/* form */
|
||||||
|
.mailpoet_form {
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.mailpoet_form_paragraph.last {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2.mailpoet-heading {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* columns */
|
||||||
|
.mailpoet_column_with_background {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* space between columns */
|
||||||
|
.mailpoet_form_column:not(:first-child) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* input wrapper (label + input) */
|
||||||
|
.mailpoet_paragraph {
|
||||||
|
line-height:20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* labels */
|
||||||
|
.mailpoet_segment_label,
|
||||||
|
.mailpoet_text_label,
|
||||||
|
.mailpoet_textarea_label,
|
||||||
|
.mailpoet_select_label,
|
||||||
|
.mailpoet_radio_label,
|
||||||
|
.mailpoet_checkbox_label,
|
||||||
|
.mailpoet_list_label,
|
||||||
|
.mailpoet_date_label {
|
||||||
|
display:block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inputs */
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea,
|
||||||
|
.mailpoet_select,
|
||||||
|
.mailpoet_date_month,
|
||||||
|
.mailpoet_date_day,
|
||||||
|
.mailpoet_date_year,
|
||||||
|
.mailpoet_date {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_checkbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_submit {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_divider {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_message {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading {
|
||||||
|
width: 30px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading > span {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #5b5b5b;
|
||||||
|
}
|
||||||
|
EOL;
|
||||||
|
}
|
||||||
|
}
|
257
lib/Form/Templates/Templates/Template6SlideIn.php
Normal file
257
lib/Form/Templates/Templates/Template6SlideIn.php
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MailPoet\Form\Templates\Templates;
|
||||||
|
|
||||||
|
use MailPoet\Form\Templates\FormTemplate;
|
||||||
|
|
||||||
|
class Template6SlideIn extends FormTemplate {
|
||||||
|
const ID = 'template_6_slide_in';
|
||||||
|
|
||||||
|
public function getName(): string {
|
||||||
|
return 'Template 6 Slide-in';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBody(): array {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">Dive in!</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '72',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Join [mailpoet_subscribers_count] others, and start your fitness journey with us today. </strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '20',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'text',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Insert your email address', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
'required' => '1',
|
||||||
|
'label_within' => '1',
|
||||||
|
],
|
||||||
|
'id' => 'email',
|
||||||
|
'name' => 'Email',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '0',
|
||||||
|
'background_color' => '#f8fbff',
|
||||||
|
'font_color' => '#38527a',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'submit',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
'id' => 'submit',
|
||||||
|
'name' => 'Submit',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '1',
|
||||||
|
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||||
|
'font_size' => '19',
|
||||||
|
'font_color' => '#ffffff',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'padding' => '16',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'paragraph',
|
||||||
|
'id' => 'paragraph',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">We promise we\'ll never spam! Take a look at our <a href="https://www.mailpoet.com/privacy-notice/">Privacy Policy</a> for more info.</span></strong></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'drop_cap' => '0',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '14',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'background_color' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSettings(): array {
|
||||||
|
return [
|
||||||
|
'success_message' => '',
|
||||||
|
'segments' => [],
|
||||||
|
'alignment' => 'left',
|
||||||
|
'fontSize' => '16',
|
||||||
|
'form_placement_slide_in_enabled' => '1',
|
||||||
|
'form_placement_fixed_bar_enabled' => '',
|
||||||
|
'form_placement_popup_enabled' => '',
|
||||||
|
'form_placement_bellow_posts_enabled' => '',
|
||||||
|
'place_form_bellow_all_pages' => '',
|
||||||
|
'place_form_bellow_all_posts' => '',
|
||||||
|
'place_popup_form_on_all_pages' => '',
|
||||||
|
'place_popup_form_on_all_posts' => '',
|
||||||
|
'popup_form_delay' => '15',
|
||||||
|
'place_fixed_bar_form_on_all_pages' => '',
|
||||||
|
'place_fixed_bar_form_on_all_posts' => '',
|
||||||
|
'fixed_bar_form_delay' => '15',
|
||||||
|
'fixed_bar_form_position' => 'top',
|
||||||
|
'place_slide_in_form_on_all_pages' => '',
|
||||||
|
'place_slide_in_form_on_all_posts' => '',
|
||||||
|
'slide_in_form_delay' => '0',
|
||||||
|
'slide_in_form_position' => 'right',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'border_size' => '0',
|
||||||
|
'form_padding' => '35',
|
||||||
|
'input_padding' => '16',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
'background_image_url' => 'http://mailpoet.info/wp-content/uploads/2020/07/form-bg.jpg',
|
||||||
|
'background_image_display' => 'scale',
|
||||||
|
'close_button' => 'classic',
|
||||||
|
'below_post_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'slide_in_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '400',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixed_bar_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'popup_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'other_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'segments_selected_by' => 'admin',
|
||||||
|
'success_validation_color' => '#00d084',
|
||||||
|
'error_validation_color' => '#cf2e2e',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStyles(): string {
|
||||||
|
return <<<EOL
|
||||||
|
/* form */
|
||||||
|
.mailpoet_form {
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.mailpoet_form_paragraph.last {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2.mailpoet-heading {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* columns */
|
||||||
|
.mailpoet_column_with_background {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* space between columns */
|
||||||
|
.mailpoet_form_column:not(:first-child) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* input wrapper (label + input) */
|
||||||
|
.mailpoet_paragraph {
|
||||||
|
line-height:20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* labels */
|
||||||
|
.mailpoet_segment_label,
|
||||||
|
.mailpoet_text_label,
|
||||||
|
.mailpoet_textarea_label,
|
||||||
|
.mailpoet_select_label,
|
||||||
|
.mailpoet_radio_label,
|
||||||
|
.mailpoet_checkbox_label,
|
||||||
|
.mailpoet_list_label,
|
||||||
|
.mailpoet_date_label {
|
||||||
|
display:block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inputs */
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea,
|
||||||
|
.mailpoet_select,
|
||||||
|
.mailpoet_date_month,
|
||||||
|
.mailpoet_date_day,
|
||||||
|
.mailpoet_date_year,
|
||||||
|
.mailpoet_date {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_checkbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_submit {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_divider {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_message {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading {
|
||||||
|
width: 30px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading > span {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #5b5b5b;
|
||||||
|
}
|
||||||
|
EOL;
|
||||||
|
}
|
||||||
|
}
|
252
lib/Form/Templates/Templates/Template6Widget.php
Normal file
252
lib/Form/Templates/Templates/Template6Widget.php
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace MailPoet\Form\Templates\Templates;
|
||||||
|
|
||||||
|
use MailPoet\Form\Templates\FormTemplate;
|
||||||
|
|
||||||
|
class Template6Widget extends FormTemplate {
|
||||||
|
const ID = 'template_6_widget';
|
||||||
|
|
||||||
|
public function getName(): string {
|
||||||
|
return 'Template 6 Widget';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBody(): array {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Dive in!</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '32',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'heading',
|
||||||
|
'id' => 'heading',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.</strong></span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'level' => '2',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '16',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'background_color' => '',
|
||||||
|
'anchor' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'text',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Insert your email address', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
'required' => '1',
|
||||||
|
'label_within' => '1',
|
||||||
|
],
|
||||||
|
'id' => 'email',
|
||||||
|
'name' => 'Email',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '0',
|
||||||
|
'background_color' => '#f8fbff',
|
||||||
|
'font_color' => '#38527a',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'submit',
|
||||||
|
'params' => [
|
||||||
|
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
'id' => 'submit',
|
||||||
|
'name' => 'Submit',
|
||||||
|
'styles' => [
|
||||||
|
'full_width' => '1',
|
||||||
|
'bold' => '1',
|
||||||
|
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||||
|
'font_size' => '19',
|
||||||
|
'font_color' => '#ffffff',
|
||||||
|
'border_size' => '0',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type' => 'paragraph',
|
||||||
|
'id' => 'paragraph',
|
||||||
|
'params' => [
|
||||||
|
'content' => _x('<strong><strong><strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">We promise we\'ll never spam! Take a look at our <a href="https://www.mailpoet.com/privacy-notice/">Privacy Policy </a>for more info.</span></strong></strong></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||||
|
'drop_cap' => '0',
|
||||||
|
'align' => 'center',
|
||||||
|
'font_size' => '13',
|
||||||
|
'line_height' => '1.5',
|
||||||
|
'text_color' => '#38527a',
|
||||||
|
'background_color' => '',
|
||||||
|
'class_name' => '',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSettings(): array {
|
||||||
|
return [
|
||||||
|
'success_message' => '',
|
||||||
|
'segments' => [],
|
||||||
|
'alignment' => 'left',
|
||||||
|
'fontSize' => '19',
|
||||||
|
'form_placement_slide_in_enabled' => '',
|
||||||
|
'form_placement_fixed_bar_enabled' => '',
|
||||||
|
'form_placement_popup_enabled' => '',
|
||||||
|
'form_placement_bellow_posts_enabled' => '',
|
||||||
|
'place_form_bellow_all_pages' => '',
|
||||||
|
'place_form_bellow_all_posts' => '',
|
||||||
|
'place_popup_form_on_all_pages' => '',
|
||||||
|
'place_popup_form_on_all_posts' => '',
|
||||||
|
'popup_form_delay' => '15',
|
||||||
|
'place_fixed_bar_form_on_all_pages' => '',
|
||||||
|
'place_fixed_bar_form_on_all_posts' => '',
|
||||||
|
'fixed_bar_form_delay' => '15',
|
||||||
|
'fixed_bar_form_position' => 'top',
|
||||||
|
'place_slide_in_form_on_all_pages' => '',
|
||||||
|
'place_slide_in_form_on_all_posts' => '',
|
||||||
|
'slide_in_form_delay' => '15',
|
||||||
|
'slide_in_form_position' => 'right',
|
||||||
|
'border_radius' => '10',
|
||||||
|
'border_size' => '0',
|
||||||
|
'form_padding' => '15',
|
||||||
|
'input_padding' => '12',
|
||||||
|
'font_family' => 'Montserrat',
|
||||||
|
'background_image_url' => 'http://mailpoet.info/wp-content/uploads/2020/07/form-bg.jpg',
|
||||||
|
'background_image_display' => 'scale',
|
||||||
|
'close_button' => 'classic',
|
||||||
|
'below_post_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'slide_in_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '420',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixed_bar_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'popup_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'pixel',
|
||||||
|
'value' => '560',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'other_styles' => [
|
||||||
|
'width' => [
|
||||||
|
'unit' => 'percent',
|
||||||
|
'value' => '100',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'segments_selected_by' => 'admin',
|
||||||
|
'success_validation_color' => '#00d084',
|
||||||
|
'error_validation_color' => '#cf2e2e',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStyles(): string {
|
||||||
|
return <<<EOL
|
||||||
|
/* form */
|
||||||
|
.mailpoet_form {
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.mailpoet_form_paragraph.last {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* columns */
|
||||||
|
.mailpoet_column_with_background {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* space between columns */
|
||||||
|
.mailpoet_form_column:not(:first-child) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* input wrapper (label + input) */
|
||||||
|
.mailpoet_paragraph {
|
||||||
|
line-height:20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* labels */
|
||||||
|
.mailpoet_segment_label,
|
||||||
|
.mailpoet_text_label,
|
||||||
|
.mailpoet_textarea_label,
|
||||||
|
.mailpoet_select_label,
|
||||||
|
.mailpoet_radio_label,
|
||||||
|
.mailpoet_checkbox_label,
|
||||||
|
.mailpoet_list_label,
|
||||||
|
.mailpoet_date_label {
|
||||||
|
display:block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inputs */
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea,
|
||||||
|
.mailpoet_select,
|
||||||
|
.mailpoet_date_month,
|
||||||
|
.mailpoet_date_day,
|
||||||
|
.mailpoet_date_year,
|
||||||
|
.mailpoet_date {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_text,
|
||||||
|
.mailpoet_textarea {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_checkbox {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_submit {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_divider {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_message {
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading {
|
||||||
|
width: 30px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_loading > span {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #5b5b5b;
|
||||||
|
}
|
||||||
|
EOL;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user