Skip to content

Commit

Permalink
MAGETWO-82535: Fixed ability to set field config from layout xml #11302
Browse files Browse the repository at this point in the history
… [backport 2.2] #11643

 - Merge Pull Request #11643 from vovayatsyuk/magento2:2.2-fix-checkout-field-config-reader-from-layout-xml
 - Merged commits:
   1. 29ce8be
  • Loading branch information
dmanners committed Oct 23, 2017
2 parents 4d26093 + 29ce8be commit 2ebacdc
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,19 @@ 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,
Expand Down

0 comments on commit 2ebacdc

Please sign in to comment.