Commit Graph

18 Commits

Author SHA1 Message Date
 Ján Mikláš
4a54033d1e Correctly show error message next to the field when the same form is rendered multiple times
Every form block now has unique ID (even the same block in two different form has different ID) used for rendering error messages. Before this, when the same form was rendered on a page multiple times, error messages of custom fields were always shown on the last rendered form, even if the first one was submitted.

[MAILPOET-6182]
2024-09-02 12:53:26 +02:00
 Ján Mikláš
b7a6f0bea1 Change error message for checkbox and radio blocks in forms
[MAILPOET-6182]
2024-09-02 12:53:26 +02:00
Jan Jakes
0fc6f40764 Fix W3C standard violation
Reported in https://wordpress.org/support/topic/w3c-standard-violation/#post-17543406.

[MAILPOET-5993]
2024-04-03 10:47:01 +02:00
Rodrigo Primo
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
Rostislav Wolny
e62a3ee5b5 Add escaping for known shortcodes when rendered in form textarea's value
[MAILPOET-5243]
2023-04-27 10:42:34 +02:00
Rostislav Wolny
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
Rostislav Wolny
274a77ea92 Update from front end rendering to support font sizes with units
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
Jan Lysý
ce4aa37326 Add translating validation error messages for custom fields
[MAILPOET-4901]
2023-03-09 14:45:44 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01: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
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
Jan Lysý
eb07872d13 Disable segments validation when form ID is empty
[MAILPOET-4155]
2022-04-11 15:30:48 +02:00
Jan Jakes
ce3a8bed8c Fix errors detected by updated PHPStan
[MAILPOET-4055]
2022-03-09 14:11:03 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00