Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ability to set field config from layout xml #11302 [backport 2.2] #11643

Conversation

vovayatsyuk
Copy link
Member

Description

Config array is hardcoded to read three settings only. The patch allows reading all settings from config.

Example:

<item name="postcode" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="label" xsi:type="string">Another Label</item>
        <item name="placeholder" xsi:type="string">Field Placeholder</item>
    </item>
</item>

Manual testing scenarios

  1. Open Magento/Checkout/view/frontend/layout/checkout_index_index.xml and find postcode settings

  2. Change its settings as follows:

    <item name="postcode" xsi:type="array">
        <!-- post-code field has custom UI component -->
        <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
        <item name="validation" xsi:type="array">
            <item name="required-entry" xsi:type="string">true</item>
        </item>
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">test label</item>
            <item name="placeholder" xsi:type="string">test placeholder</item>
        </item>
    </item>
  3. Navigate to checkout and you'll see that settings are not working.

  4. Apply the patch and settings will start working.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@dmanners dmanners self-assigned this Oct 23, 2017
@dmanners dmanners added this to the October 2017 milestone Oct 23, 2017
@dmanners
Copy link
Contributor

@vovayatsyuk thanks for this. I will process this now for you.

@magento-team magento-team merged commit 29ce8be into magento:2.2-develop Oct 26, 2017
magento-team pushed a commit that referenced this pull request Oct 26, 2017
magento-team pushed a commit that referenced this pull request Oct 26, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82724 Allow coupon code with special charater to be applied to order in checkout #11710
 - MAGETWO-82675 Add a health check to the NGINX configuration sample #11690
 - MAGETWO-82562 Coupon codes not showing in invoice #11635
 - MAGETWO-82535 Fixed ability to set field config from layout xml #11302 [backport 2.2] #11643
 - MAGETWO-81146 Fixing #10275 keyboard submit of adminhtml suggest form. #11250
 - MAGETWO-82761 [Backport 2.2-develop] Dashboard Fix Y Axis for range #11751
 - MAGETWO-82748 Fix Notice: freePackageValue is undefined #11720
 - MAGETWO-82747 [TASK] Updated user.ini according to Magento DevDocs #11734
 - MAGETWO-82537 MAGETWO-81311: Check the length of the array before attempting to sli… #11637
 - MAGETWO-81970 Add missing translations in Magento_UI #11440
 - MAGETWO-81904 FIX #11022 in 2.2-develop: Filter Groups of search criteria parameter have not been included for further processing #11421
 - MAGETWO-82179 Fix Filter Customer Report Review 2.2-develop [Backport] #11522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants