Commit Graph

81 Commits

Author SHA1 Message Date
19de902c3f Load editor styles in analytics
[MAILPOET-5091]
2023-07-18 13:03:16 +02:00
f3f33e5859 Don't automatically include homepage in all pages
MAILPOET-4897
2023-07-12 10:14:52 +02:00
677ae370ed Handle special case for selected Posts page
MAILPOET-4897
2023-07-12 10:14:52 +02:00
481f5585a0 Add form placement options for homepage, archives
MAILPOET-4897
2023-07-12 10:14:52 +02:00
f10ef78825 Add Analytics Page and backend logic
[MAILPOET-5088]
2023-06-15 12:25:12 +02:00
565959f28c Unify escaping of the attribute
[MAILPOET-4632]
2023-06-01 13:20:31 +02:00
a5899895a8 Check if we have proper variables for padding and colors
[MAILPOET-4632]
2023-06-01 13:20:31 +02:00
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
e81a8fca6a Load @wordpress/date settings and locale data for date picker
[MAILPOET-5000]
2023-05-08 13:58:31 +02:00
e62a3ee5b5 Add escaping for known shortcodes when rendered in form textarea's value
[MAILPOET-5243]
2023-04-27 10:42:34 +02:00
930ff18785 Skip add_query_arg() finding as false positive
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
9240603063 Escape checkbox label on render
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
4f42fa86a3 Use proper escaping function in option inner html
[MAILPOET-5233]
2023-04-17 11:51:52 +02:00
94eeae5626 Escape values in Select block render
[MAILPOET-5233]
2023-04-17 11:51:52 +02:00
7fbb53e452 Fix possible scrollbar in forms
[MAILPOET-5116]
2023-03-22 09:20:57 +01:00
d14ce5410b Fix bold labels in forms
We save the falsy value for bold as "0" which was causing that labels
were rendered bold in front end also when the checkbox was disabled.
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
274a77ea92 Update from front end rendering to support font sizes with units
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
2adc7fbc5e Add commons.js via wp_enqueue_script
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
0a11fadb05 Enqueue newletter assest using asset controller
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
c54a414d51 Make sure translations are loaded for newsletter editor
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
f329306b1a Remove editor translations from tpl and add via wp/i18n
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
ece4977d6a Add newsletter_editor.js using AssetsController
newsletter_editor.js was added via newsletter/editor.html
it's now removed from the template and wpEnqueueScript is
user instead

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
ce4aa37326 Add translating validation error messages for custom fields
[MAILPOET-4901]
2023-03-09 14:45:44 +01:00
a76fb6c63a Update form template "Relax" definition to display correctly
The popup and slide-in forms should not display email input and submit button in columns.
[MAILPOET-5047]
2023-02-13 12:14:05 +01:00
0019ad110e Update DisplayFormInWPContent::display method type and add more tests
MAILPOET-4885
MAILPOET-4820
2023-01-25 13:15:08 +01:00
62325dc096 Fix multiple forms display on pages with Woocommerce [products] shortcode
MAILPOET-4885
2023-01-25 13:15:08 +01:00
761f7c6537 Prevent issues if other plugins define WC function
It's possible that other plugins might define wc_get_page_id, so it's
more important to know that WC is installed/active than to know if the
function itself exists.

For good measure I'm including a cast to int even though the WC version
of the function always returns an integer. This is probably unnecessary
but it protects us from the possibility of the WC version of the
function returning something other than an integer in the future.

[MAILPOET-4834]
2022-11-30 11:03:40 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
a82a810269 Update form templates to include privacy page link (if found)
MAILPOET-4651
2022-11-16 16:51:12 +01:00
5a378b3c5f Add replacePrivacyLinkTags method for Form Template
MAILPOET-4651
2022-11-16 16:51:12 +01:00
b6e7e39fb0 Rename method and move wcGetPageId to Woo helper class
MAILPOET-4663
2022-11-01 14:58:47 +01:00
8c24d59f43 Add tests for form display on Woo Shop listing page
MAILPOET-4663
2022-11-01 14:58:47 +01:00
5ed0c3fb2d Allow form display on Woo Shop listing page
The WooCommerce Shop page is a special kind of page. It’s basically a post archive.

The Shop page is a placeholder for a post type archive for products. It may render differently than other pages in your install.
https://woocommerce.com/document/woocommerce-pages/#section-4

It doesn’t have any content and WooCommerce core team is also removing the the-content filter from the Shop listing page hence why we are unable to hook into the the-content filter we use for other parts of the codebase

MAILPOET-4663
2022-11-01 14:58:47 +01:00
742e3e85e9 Load translations for automation scripts using wp_set_script_translations()
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
6eeb5bb1bf Load all automation scripts using wp_enqueue_script()
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
524e403a88 escape string for usage in JavaScript
[MAILPOET-4694]
2022-10-17 10:26:38 +02:00
941e443c22 Remove version number from the widget
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
598ae291e5 Fix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
c601aaa3eb Autofix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
97e160bf67 Fix WordPress.WP.I18n.MissingArgDomain
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
57c02a2fd3 Inline form honey pot css style
Inline !important styling has more specificity that styling
added inside style tag, and is more likely to work on more
devices

[MAILPOET-4519]
2022-08-04 10:10:16 +02:00
c170641d83 Fix form checkbox html
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
bf5d27cc79 Unify error message for invalid email with other messages
Other error messages are also ended with period.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
7f525068b3 Improve legend tag rendering in forms
The legend html was not escaped and was ignoring block settings coming
from the form editor.
This commit adds a new helper function for rendering legend that respects
applies block settings and also escapes the output.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
6671c573b8 Improve email error message in forms.
Added a 'type-message' for Parsley to display an error message when the input field is filled in incorrectly.
Also removed the global Parsley message to prevent it from overruling the 'required-message'.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
be220c4782 Add a fieldset and legend element to the radio buttons.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00