File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,7 @@ protected function _prepareForm()
50
50
51
51
/** @var \Magento\Framework\Data\Form $form */
52
52
$ form = $ this ->_formFactory ->create ();
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
- }
53
+ $ fieldset = $ form ->addFieldset ('set_name ' , ['legend ' => $ this ->getAttributeSetLabel ()]);
58
54
$ fieldset ->addField (
59
55
'attribute_set_name ' ,
60
56
'text ' ,
@@ -95,4 +91,18 @@ protected function _prepareForm()
95
91
$ form ->setOnsubmit ('return false; ' );
96
92
$ this ->setForm ($ form );
97
93
}
94
+
95
+ /**
96
+ * Get Attribute Set Label
97
+ *
98
+ * @return \Magento\Framework\Phrase
99
+ */
100
+ private function getAttributeSetLabel ()
101
+ {
102
+ if ($ this ->getRequest ()->getParam ('id ' , false )) {
103
+ return __ ('Edit Attribute Set Name ' );
104
+ }
105
+
106
+ return __ ('Attribute Set Information ' );
107
+ }
98
108
}
You can’t perform that action at this time.
0 commit comments