From fd66204c60e27625a98453399c74c47235bea710 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Mon, 9 Oct 2017 12:11:19 +0300 Subject: [PATCH 1/2] Fixed ability to set field config from layout xml Example: ``` Another Label Field Placeholder ... ``` --- .../Block/Checkout/AttributeMerger.php | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 4ee3d070d5b77..0230923967d90 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -168,20 +168,18 @@ protected function getFieldConfig( $element = [ 'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent, - 'config' => [ - // customScope is used to group elements within a single form (e.g. they can be validated separately) - 'customScope' => $dataScopePrefix, - 'customEntry' => isset($additionalConfig['config']['customEntry']) - ? $additionalConfig['config']['customEntry'] - : null, - 'template' => 'ui/form/field', - 'elementTmpl' => isset($additionalConfig['config']['elementTmpl']) - ? $additionalConfig['config']['elementTmpl'] - : $elementTemplate, - 'tooltip' => isset($additionalConfig['config']['tooltip']) - ? $additionalConfig['config']['tooltip'] - : null - ], + 'config' => $this->mergeConfigurationNode( + 'config', + $additionalConfig, + [ + 'config' => [ + // customScope is used to group elements within a single form (e.g. they can be validated separately) + 'customScope' => $dataScopePrefix, + 'template' => 'ui/form/field', + 'elementTmpl' => $elementTemplate, + ], + ] + ), 'dataScope' => $dataScopePrefix . '.' . $attributeCode, 'label' => $attributeConfig['label'], 'provider' => $providerName, From 626971835414dc4915603f064d00c6967c29dbf8 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Mon, 9 Oct 2017 14:57:21 +0300 Subject: [PATCH 2/2] Fixed LiveCodeTest failure: Line exceeds maximum limit of 120 characters --- app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php index 0230923967d90..d93475a4744ca 100644 --- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php +++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php @@ -173,7 +173,8 @@ protected function getFieldConfig( $additionalConfig, [ 'config' => [ - // customScope is used to group elements within a single form (e.g. they can be validated separately) + // customScope is used to group elements within a single + // form (e.g. they can be validated separately) 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => $elementTemplate,