From 2e814fe8ee001a0cd7b26c6c6b98d3df88c3e914 Mon Sep 17 00:00:00 2001 From: Garry Childs Date: Sat, 29 Jun 2024 19:24:32 +0100 Subject: [PATCH 1/4] Added novalidate to boolean attributes array Signed-off-by: Garry Childs --- src/View/Helper/AbstractHelper.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/View/Helper/AbstractHelper.php b/src/View/Helper/AbstractHelper.php index f50ee9b3..56befb3d 100644 --- a/src/View/Helper/AbstractHelper.php +++ b/src/View/Helper/AbstractHelper.php @@ -51,14 +51,15 @@ abstract class AbstractHelper extends BaseAbstractHelper * @var array */ protected $booleanAttributes = [ - 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus - 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked - 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled - 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope - 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple - 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly - 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required - 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected + 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus + 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked + 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled + 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope + 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple + 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly + 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required + 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected + 'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected ]; /** From 23e6567dd784581fe9c6bf8a110ee32062b2a80e Mon Sep 17 00:00:00 2001 From: Garry Childs Date: Tue, 2 Jul 2024 21:20:12 +0100 Subject: [PATCH 2/4] Reverted changes requested Signed-off-by: Garry Childs --- src/View/Helper/AbstractHelper.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/View/Helper/AbstractHelper.php b/src/View/Helper/AbstractHelper.php index 56befb3d..25f76fbd 100644 --- a/src/View/Helper/AbstractHelper.php +++ b/src/View/Helper/AbstractHelper.php @@ -51,14 +51,14 @@ abstract class AbstractHelper extends BaseAbstractHelper * @var array */ protected $booleanAttributes = [ - 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus - 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked - 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled - 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope - 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple - 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly - 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required - 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected + 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus + 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked + 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled + 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope + 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple + 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly + 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required + 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected 'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected ]; From 65a43cf7aa4df818b34e91fb0d6b1d65b9af77a1 Mon Sep 17 00:00:00 2001 From: Garry Childs Date: Wed, 3 Jul 2024 07:45:01 +0100 Subject: [PATCH 3/4] Ran vendor/bin/phpcbf Signed-off-by: Garry Childs --- src/View/Helper/AbstractHelper.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/View/Helper/AbstractHelper.php b/src/View/Helper/AbstractHelper.php index 25f76fbd..1794030c 100644 --- a/src/View/Helper/AbstractHelper.php +++ b/src/View/Helper/AbstractHelper.php @@ -51,14 +51,14 @@ abstract class AbstractHelper extends BaseAbstractHelper * @var array */ protected $booleanAttributes = [ - 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus - 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked - 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled - 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope - 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple - 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly - 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required - 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected + 'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus + 'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked + 'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled + 'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope + 'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple + 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly + 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required + 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected 'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected ]; From 0ad3af6a25e0244ca1803714046315aeaeceb539 Mon Sep 17 00:00:00 2001 From: Garry Childs Date: Thu, 4 Jul 2024 21:00:15 +0100 Subject: [PATCH 4/4] Update link url in comment Co-authored-by: George Steel Signed-off-by: Garry Childs --- src/View/Helper/AbstractHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/View/Helper/AbstractHelper.php b/src/View/Helper/AbstractHelper.php index 1794030c..b1a96bc9 100644 --- a/src/View/Helper/AbstractHelper.php +++ b/src/View/Helper/AbstractHelper.php @@ -59,7 +59,7 @@ abstract class AbstractHelper extends BaseAbstractHelper 'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly 'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required 'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected - 'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected + 'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-fs-novalidate ]; /**