From 146089e021ad7e705b74cb6f604341bd325c6de9 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 18 Feb 2021 14:57:06 +0100 Subject: [PATCH] Button: Add default name attribute for cancel button --- .../UI/Base/Component/Button/ButtonUIBlockFactory.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php b/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php index 379de9c43..6cd4594b1 100644 --- a/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php +++ b/sources/application/UI/Base/Component/Button/ButtonUIBlockFactory.php @@ -279,6 +279,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory ?string $sId = null ): Button { $sLabel = $sLabel ?? Dict::S('UI:Button:Cancel'); + $sName = $sName ?? 'cancel'; + return static::MakeForAction($sLabel, Button::ENUM_COLOR_NEUTRAL, Button::ENUM_ACTION_TYPE_ALTERNATIVE, $sValue, $sName, $bIsSubmit, $sId); }