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

respect depends declaration in system.xml for form element #3469

Merged
merged 1 commit into from
Mar 22, 2017
Merged

respect depends declaration in system.xml for form element #3469

merged 1 commit into from
Mar 22, 2017

Conversation

phoenix-bjoern
Copy link
Contributor

@phoenix-bjoern phoenix-bjoern commented Feb 18, 2016

The Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray class uses Magento_Config::system/config/form/field/array.phtml to render the form element. It is used e.g. to render design exceptions in the system configuration.

If you use the declaration within the system.xml for a form element and use a block class that relies on AbstractFieldArray as source_model the JavaScript to toggle the depending form elements (FormElementDependenceController) won't have any effect. In fact a JavaScript error is caused as no HTML element is found with the ID matching the name of form element.

The PR assigns the ID of the form element to the table surrounding the field array. That allows the FormElementDependenceController to toggle the form element according to the declaration.

While is not used with such form fields in the core it would increase reusability of the template file.

@sshymko
Copy link

sshymko commented Apr 13, 2016

+1 for the fix to be incorporated into core

@phoenix-bjoern
Copy link
Contributor Author

@joanhe can you please update the PR and let me know what is missing in order to be accepted?

@vkorotun vkorotun added Admin Panel Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept bug report bugfix and removed PS Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Aug 3, 2016
@sshrewz
Copy link

sshrewz commented Aug 11, 2016

Internal ticket - MAGETWO-56783

@sshrewz sshrewz added the linked label Aug 11, 2016
@joanhe joanhe removed their assignment Aug 17, 2016
@vkorotun vkorotun added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed linked labels Aug 22, 2016
@vrann vrann self-assigned this Mar 22, 2017
@vrann vrann added this to the March 2017 milestone Mar 22, 2017
@magento-team magento-team merged commit 31839f2 into magento:develop Mar 22, 2017
@vrann
Copy link
Contributor

vrann commented Mar 22, 2017

@phoenix-bjoern Thank you for the contribution!
@sshymko kudos for support!

magento-engcom-team pushed a commit that referenced this pull request Nov 20, 2018
[TSG] Backporting for 2.2 (pr58) (2.2.8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants