Skip to content

Commit 86434a2

Browse files
committed
Resolve Wrong Label when create new "Attribute Set" (issue 24147)
1 parent bdcaeaf commit 86434a2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main;
79

810
use Magento\Backend\Block\Widget\Form;
911

12+
/**
13+
* Form attribute set
14+
*
15+
* Class \Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main\Formset
16+
*/
1017
class Formset extends \Magento\Backend\Block\Widget\Form\Generic
1118
{
1219
/**
@@ -43,7 +50,11 @@ protected function _prepareForm()
4350

4451
/** @var \Magento\Framework\Data\Form $form */
4552
$form = $this->_formFactory->create();
46-
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]);
53+
if (!$this->getRequest()->getParam('id', false)) {
54+
$fieldset = $form->addFieldset('set_name', ['legend' => __('Attribute Set Information')]);
55+
} else {
56+
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]);
57+
}
4758
$fieldset->addField(
4859
'attribute_set_name',
4960
'text',

app/code/Magento/Catalog/i18n/en_US.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,3 +813,5 @@ Details,Details
813813
"Edit Category Design","Edit Category Design"
814814
"A total of %1 record(s) haven't been deleted. Please see server logs for more details.","A total of %1 record(s) haven't been deleted. Please see server logs for more details."
815815
"Are you sure you want to delete this category?","Are you sure you want to delete this category?"
816+
"Attribute Set Information","Attribute Set Information"
817+

0 commit comments

Comments
 (0)