Commit Graph

44 Commits

Author SHA1 Message Date
David Remer
524e403a88 escape string for usage in JavaScript
[MAILPOET-4694]
2022-10-17 10:26:38 +02:00
Pavel Dohnal
941e443c22 Remove version number from the widget
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Jan Jakes
598ae291e5 Fix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
Jan Jakes
c601aaa3eb Autofix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
David Remer
97e160bf67 Fix WordPress.WP.I18n.MissingArgDomain
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
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
Sam Najian
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
Rostislav Wolny
c170641d83 Fix form checkbox html
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Rostislav Wolny
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
Rostislav Wolny
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
Berkay Simsek
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
Berkay Simsek
be220c4782 Add a fieldset and legend element to the radio buttons.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Berkay Simsek
b891ca4164 Add a fieldset and legend element to the checkboxes.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Berkay Simsek
ba45281324 Add fieldset and legend to list selection
Made checkboxes in a form accessible according to the WCAG-standards by adding a fieldset around them and adding a legend describing the fieldset's purpose
(name).
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Berkay Simsek
0dc35da401 Improve autocomplete accessibility for names in forms
Changed the autocomplete attributes for input fields: 'first_name' & 'last_name' to comply with the WCAG-standards for autocompletion.
[MAILPOET-4408]
2022-06-13 17:15:44 +02:00
Sam Najian
764f657935 Make sure Heading block parameters are defined before setting
[MAILPOET-4411]
2022-06-13 13:59:45 +02:00
Oluwaseun Olorunsola
7e59ad7f90 Fix screen-reader-text class does not exist in iFrame
screen-reader-text CSS class only exists within the WordPress environment

the class does not exist when using iFrame forms due to these being used outside the WordPress context

prefixing with mailpoet-* to not interfere with the default WordPress screen-reader-text class

MAILPOET-4312
2022-06-13 11:06:01 +02:00
Brezo Cordero
57f6d54fdf Add label and id also to custom fields
[MAILPOET-3331]
2022-06-13 11:06:01 +02:00
Brezo Cordero
6ad442a5dc Add label to text form
[MAILPOET-3331]
2022-06-13 11:06:01 +02:00
David Remer
7f13cdb34e Fix Renderer in Widget
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
4b7ecfba94 Use newly introduced twig classes
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
c73982b414 Respect 3rd party library setting when displaying custom fonts
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
David Remer
fe44d4c233 Respect mailpoet_display_custom_fonts filter in Iframe
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
Rodrigo Primo
ba47f0b854 Rename variables to make the ReCaptcha code easier to understand
This commit renames two variables to make it easier to understand the
code responsible for adding a ReCapcha to a subscription form:

formData.recaptcha -> formData.recaptchaWidgetId
formData.data.recaptcha -> formData.data.recaptchaResponseToken

Before this change it was harder to understand the difference between
formData.recaptcha and formData.data.recaptcha since they used the same
name.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
c1bd52b964 Add code to display the invisible ReCaptcha in the frontend
This commit adds the required code to display the invisible ReCaptcha in
the frontend when a form is rendered and this type of captcha is
selected in the admin.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Sam Najian
631640c4ea Make form iframe resizing cross-origin compatible
[MAILPOET-3655]
2022-05-17 14:16:45 +02:00
Jan Lysý
ba99d331f1 Remove duplicated code
[MAILPOET-4209]
2022-05-16 13:15:59 +02:00
Jan Lysý
81bfbd5bf4 Add autocomplete attribute for text inputs in forms
[MAILPOET-4284]
2022-05-16 13:15:59 +02:00
David Remer
8c7097df85 Add / when generating the Iframe URL
[MAILPOET-4337]
2022-05-16 11:31:39 +02:00
Jan Lysý
eb07872d13 Disable segments validation when form ID is empty
[MAILPOET-4155]
2022-04-11 15:30:48 +02:00
John Oleksowicz
fc1f3e6dc2 Inline generateToken for clarity
The only thing Security::generateToken was providing was a default value
 for the $action, which created a pattern of using the same $action
 everywhere, which may not be the best way to go.

 Since it was essentially a wrapper for WP's built-in nonce functions,
 it seemed clearer to use those functions directly to be more explicit
 about how we're handling tokens.

[MAILPOET-2030]
2022-04-11 10:29:35 +02:00
David Remer
53fc49d1eb Simplify phpcs:disable comments
Additionally this commit contains a conversion from %d to %s in a query

[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
bde6c1ce65 Escape output according to sniffs
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
a8d88beec9 Escape output according to WP sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
David Remer
fb7a0a0e62 Add custom message styles to CaptchaRenderer
[MAIPOET-4134]
2022-03-31 08:58:12 +02:00
Jan Jakes
ce3a8bed8c Fix errors detected by updated PHPStan
[MAILPOET-4055]
2022-03-09 14:11:03 +01:00
Brezo Cordero
bfa9a98df6 Do not display form if logged in and registered to any segment.
[MAILPOET-3059]
2022-02-23 15:22:24 +01:00
Brezo Cordero
8c70069064 Add selection in form editor for cookie expiration time.
[MAILPOET-3059]
2022-02-23 15:22:24 +01:00
Brezo Cordero
250988163c Per form cookie and expiration date
Add expiration date and change popup_form_dismissed to per form cookie on public.js.

[MAILPOET-3059]
2022-02-23 15:22:24 +01:00
Rostislav Wolny
9a78b87907 Allow mark tag in form contents
The new text highlight feature uses the tag so we need to allow it.
[MAILPOET-4029]
2022-01-19 12:21:15 +01:00
Rostislav Wolny
f33d283267 Fix rich text editing for image captions
We rendered correct html in the editor but it was still escaped on front end.
This commit allows rendering some basic html in image captions.
[MAILPOET-4029]
2022-01-19 12:21:15 +01:00
Rostislav Wolny
87d443614d Add support for padding for columns block
It was possible to set padding within a single column. After this update a user can set
padding for columns wrapper.
[MAILPOET-4029]
2022-01-19 12:21:15 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00