diff --git a/lib/AdminPages/Pages/FormEditor.php b/lib/AdminPages/Pages/FormEditor.php index 4a9294e206..5f97a1e791 100644 --- a/lib/AdminPages/Pages/FormEditor.php +++ b/lib/AdminPages/Pages/FormEditor.php @@ -20,6 +20,11 @@ use MailPoet\Form\Templates\Templates\Template4FixedBar; use MailPoet\Form\Templates\Templates\Template4Popup; use MailPoet\Form\Templates\Templates\Template4SlideIn; 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\Export; use MailPoet\Models\Form; @@ -68,6 +73,11 @@ class FormEditor { Template4Popup::ID, Template4SlideIn::ID , Template4Widget::ID, + Template6BelowPages::ID, + Template6FixedBar::ID, + Template6Popup::ID, + Template6SlideIn::ID , + Template6Widget::ID, ]; public function __construct( diff --git a/lib/Form/Templates/TemplateRepository.php b/lib/Form/Templates/TemplateRepository.php index 8ae70f312e..04e636eb72 100644 --- a/lib/Form/Templates/TemplateRepository.php +++ b/lib/Form/Templates/TemplateRepository.php @@ -14,6 +14,11 @@ use MailPoet\Form\Templates\Templates\Template4FixedBar; use MailPoet\Form\Templates\Templates\Template4Popup; use MailPoet\Form\Templates\Templates\Template4SlideIn; 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; class TemplateRepository { @@ -33,6 +38,11 @@ class TemplateRepository { Template4Popup::ID => Template4Popup::class, Template4SlideIn::ID => Template4SlideIn::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 { diff --git a/lib/Form/Templates/Templates/Template4BelowPages.php b/lib/Form/Templates/Templates/Template4BelowPages.php index 60b514d9a9..3cc99ab9cb 100644 --- a/lib/Form/Templates/Templates/Template4BelowPages.php +++ b/lib/Form/Templates/Templates/Template4BelowPages.php @@ -8,7 +8,7 @@ class Template4BelowPages extends FormTemplate { const ID = 'template_4_below_pages'; public function getName(): string { - return 'Template 4 BelowPages'; + return 'Template 4 Below Pages'; } public function getBody(): array { diff --git a/lib/Form/Templates/Templates/Template6BelowPages.php b/lib/Form/Templates/Templates/Template6BelowPages.php new file mode 100644 index 0000000000..db174e27f5 --- /dev/null +++ b/lib/Form/Templates/Templates/Template6BelowPages.php @@ -0,0 +1,307 @@ + 'heading', + 'id' => 'heading', + 'params' => [ + 'content' => _x('Dive in!', '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('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', '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('We promise we\'ll never spam! Take a look at our Privacy Policy for more info.', '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 << span { + width: 5px; + height: 5px; + background-color: #5b5b5b; +} +EOL; + } +} diff --git a/lib/Form/Templates/Templates/Template6FixedBar.php b/lib/Form/Templates/Templates/Template6FixedBar.php new file mode 100644 index 0000000000..302dc8c87d --- /dev/null +++ b/lib/Form/Templates/Templates/Template6FixedBar.php @@ -0,0 +1,297 @@ + '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('Dive in! Start your journey today.', '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('Sign up to start your fitness program. We promise we\'ll never spam! Take a look at our Privacy Policy for more info.', '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 << span { + width: 5px; + height: 5px; + background-color: #5b5b5b; +} +h2.mailpoet-heading { + margin-bottom: 20px; + margin-top: 0; +} +EOL; + } +} diff --git a/lib/Form/Templates/Templates/Template6Popup.php b/lib/Form/Templates/Templates/Template6Popup.php new file mode 100644 index 0000000000..dff9c26268 --- /dev/null +++ b/lib/Form/Templates/Templates/Template6Popup.php @@ -0,0 +1,258 @@ + 'heading', + 'id' => 'heading', + 'params' => [ + 'content' => _x('Dive in!', '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('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', '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('We promise we\'ll never spam! Take a look at our Privacy Policy for more info.', '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 << span { + width: 5px; + height: 5px; + background-color: #5b5b5b; +} +EOL; + } +} diff --git a/lib/Form/Templates/Templates/Template6SlideIn.php b/lib/Form/Templates/Templates/Template6SlideIn.php new file mode 100644 index 0000000000..23fac71e71 --- /dev/null +++ b/lib/Form/Templates/Templates/Template6SlideIn.php @@ -0,0 +1,257 @@ + 'heading', + 'id' => 'heading', + 'params' => [ + 'content' => _x('Dive in!', '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('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today. ', '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('We promise we\'ll never spam! Take a look at our Privacy Policy for more info.', '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 << span { + width: 5px; + height: 5px; + background-color: #5b5b5b; +} +EOL; + } +} diff --git a/lib/Form/Templates/Templates/Template6Widget.php b/lib/Form/Templates/Templates/Template6Widget.php new file mode 100644 index 0000000000..8b88b40d75 --- /dev/null +++ b/lib/Form/Templates/Templates/Template6Widget.php @@ -0,0 +1,252 @@ + 'heading', + 'id' => 'heading', + 'params' => [ + 'content' => _x('Dive in!', '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('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', '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('We promise we\'ll never spam! Take a look at our Privacy Policy for more info.', '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 << span { + width: 5px; + height: 5px; + background-color: #5b5b5b; +} +EOL; + } +}