Fixed uncheck status not saved in Manage subscriptions page

Please note: Mandatory (required) checkbox Fields can not be Empty. This means the checkbox field can not be uncheck by the user. The admin can still control the status of the checkbox

[MAILPOET-3858]
This commit is contained in:
oluwaseun Olorunsola
2021-11-01 16:06:34 +01:00
committed by Veljko V
parent 62cf852691
commit 2d32e5013e
2 changed files with 11 additions and 0 deletions

View File

@@ -191,6 +191,12 @@ class BlockRendererHelper {
? $this->wp->escAttr(trim($block['params']['value'])) : '';
}
public function getFieldIsRequired($block = []): bool {
return (isset($block['params']['required'])
&& strlen(trim($block['params']['required'])) > 0)
? !empty($block['params']['required']) : false;
}
public function getInputModifiers(array $block = []): string {
$modifiers = [];