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

Display correctly "Add" button label for the block class \Magento\Con… #8354

Merged
merged 1 commit into from
Feb 3, 2017
Merged

Display correctly "Add" button label for the block class \Magento\Con… #8354

merged 1 commit into from
Feb 3, 2017

Conversation

sylvainraye
Copy link
Contributor

@sylvainraye sylvainraye commented Jan 31, 2017

…fig\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray

…fig\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray
@ishakhsuvarov
Copy link
Contributor

Hi @diglin
Could you please specify the issue you are fixing with this PR more clearly? (e. g. some steps to reproduce, actual / expected result, etc.)
Thank you!

@sylvainraye
Copy link
Contributor Author

Hi @ishakhsuvarov

There are only two lines of code changed and if you read them, you will directly see that the implementation of the "Add" button is duplicated in the original code and that a third party developer cannot set up the label without overwriting the template.

However concretely, the class filename app/code/Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php is a backend configuration form field which allows to create a kind of grid with a mapping of content.
The label of the button "Add" is initialized by the constructor of the class with the value $this->_addButtonLabel = __('Add'); but in the template app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml there is call to a missing method getAddButtonLabel(). If a developer extends the class and wants to change the label name, he can't do it via the protected variable _addButtonLabel because it has no effect on the template.

I just the possibility to a developer to customize this button label in a proper way

@ishakhsuvarov
Copy link
Contributor

@diglin Thank you for the clarification.

@mmansoor-magento mmansoor-magento merged commit 068bcde into magento:develop Feb 3, 2017
mmansoor-magento pushed a commit that referenced this pull request Feb 3, 2017
@okorshenko
Copy link
Contributor

Thank you for contribution to Magento 2 project!

@okorshenko okorshenko added this to the February 2017 milestone Feb 11, 2017
@vrann vrann added the simple label Mar 11, 2017
@Ctucker9233
Copy link

@magento-engcom-team This appears to still not be included in 2.1.10. what version will have this simple fix?

magento-devops-reposync-svc pushed a commit that referenced this pull request Aug 18, 2023
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.

6 participants