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

GUI to Edit EAV Attributes & Sets #25

Open
wants to merge 133 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
1ff7e68
Mage_Eav: Add generic grid code
justinbeaty Aug 3, 2022
851e567
Mage_Eav: Add generic form element renderers
justinbeaty Aug 3, 2022
e86bf29
Mage_Catalog: add EAV grids
justinbeaty Jul 13, 2022
42524db
Mage_Customer: Add EAV grids
justinbeaty Jul 13, 2022
c3fff1f
Mage_Customer: Add use_in_forms support
justinbeaty Aug 1, 2022
ab6a3fa
WIP: GUI to set attribute sets for customer groups
justinbeaty Aug 3, 2022
0e0c4dd
WIP: Change form based on customer group
justinbeaty Aug 3, 2022
a88557b
phpcs
fballiano Sep 19, 2024
69ffce0
Fix category controllers to extend correct class.
justinbeaty Sep 19, 2024
0383ab5
File headers + merge
fballiano Sep 19, 2024
12439ab
File headers
fballiano Sep 19, 2024
8e085f9
PHPStan
fballiano Sep 19, 2024
01a5dbb
PHPCS
fballiano Sep 19, 2024
346324c
Fixed bug with filtering grid across different entity types
fballiano Sep 19, 2024
dbf0e1a
Fixed bug with filtering grid across different entity types
fballiano Sep 19, 2024
d28843e
require_once not needed
fballiano Sep 19, 2024
99ac573
PHPStan
fballiano Sep 19, 2024
ee1dc95
Merge branch 'main' into topic-eav-grid-maho
fballiano Sep 19, 2024
cee3d2c
Added Override notation
fballiano Sep 19, 2024
ac372b3
PHPStan and reformat
fballiano Sep 19, 2024
9145677
Fixed active menu (sreichel)
justinbeaty Sep 24, 2024
632c998
Remove scope option from base EAV code
justinbeaty Sep 24, 2024
6a2ba6c
WIP: Add website switcher to customer attribute edit form
justinbeaty Sep 25, 2024
817c3e9
Support attributes with website tables
justinbeaty Sep 27, 2024
aea7bde
phpstan
justinbeaty Sep 27, 2024
938bf2f
Merge branch 'main' into topic-eav-grid-maho
fballiano Sep 28, 2024
45572a0
Rector
fballiano Sep 28, 2024
5c63c64
Fix use_in_forms
justinbeaty Sep 28, 2024
2faf08e
fixes
justinbeaty Sep 28, 2024
46cb59b
hide some attributes from grid
justinbeaty Sep 28, 2024
ba0b154
phpstan
justinbeaty Sep 28, 2024
7ee6573
add extra fields to another phtml file, may still be missing some...
justinbeaty Sep 28, 2024
86cf0c5
add install script
justinbeaty Sep 28, 2024
b6e792b
Support custom form types via config.xml
justinbeaty Sep 28, 2024
857709e
PHPStan
fballiano Sep 28, 2024
e1cada7
Merge branch 'main' into topic-eav-grid-maho
fballiano Sep 28, 2024
e4f3862
Fixed docblock
fballiano Sep 28, 2024
8d94b5d
Generic EAV used_in_forms code
justinbeaty Sep 28, 2024
81a2faf
Remove new function getFormTypesByAttribute
justinbeaty Sep 29, 2024
93fb420
Merge branch main
fballiano Oct 1, 2024
99cd461
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 1, 2024
2ea282a
Fixes, possibly broke something else, WIP
justinbeaty Oct 2, 2024
d2b6331
phpcs
justinbeaty Oct 14, 2024
53c61db
revert .phpstan.baseline.neon
justinbeaty Oct 14, 2024
736bf19
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 14, 2024
90d9752
phpstan
justinbeaty Oct 14, 2024
2400274
Reorder some fields, add field dependence, move blocks to lib/Varien,…
justinbeaty Oct 14, 2024
3b14a35
phpstan
justinbeaty Oct 15, 2024
29c94e7
phpcs
justinbeaty Oct 15, 2024
628a7de
Multiline max, and allow for customer type
justinbeaty Oct 15, 2024
12aced3
fix
justinbeaty Oct 15, 2024
f04a969
Use boolean type
justinbeaty Oct 15, 2024
967648d
Testing rendering all fields from group
justinbeaty Oct 15, 2024
b01f7c7
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 15, 2024
9e325ee
short echo syntax
justinbeaty Oct 15, 2024
487dd3a
add validation classes (thx empiricompany)
justinbeaty Oct 15, 2024
12680d0
phpcs
justinbeaty Oct 15, 2024
71aa642
validation class fix
justinbeaty Oct 15, 2024
ed1ebaa
Testing rendering all fields from group part 2
justinbeaty Oct 15, 2024
e055f5f
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 16, 2024
f084d1e
Hide attributes from group
justinbeaty Oct 16, 2024
22f68bd
move load out of loop
justinbeaty Oct 16, 2024
d66d790
Add Dropdown with Other Option input type
justinbeaty Oct 16, 2024
96bfc4c
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 18, 2024
e15c6e8
fix, don't store customselect with source_table
justinbeaty Oct 19, 2024
1222b6a
Fix customer validate
justinbeaty Oct 19, 2024
c6e6419
Customselect fixes
justinbeaty Oct 20, 2024
cfafda9
Remove Name and Address Options Config
justinbeaty Oct 20, 2024
aa2a75f
Customer helper prefix/suffix/street lines
justinbeaty Oct 20, 2024
487b10b
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 20, 2024
1751a24
PHPStan baseline
justinbeaty Oct 20, 2024
b3f055d
working on forms
justinbeaty Oct 20, 2024
a418c09
fix
justinbeaty Oct 20, 2024
7bc270a
phpcs
justinbeaty Oct 20, 2024
76507dd
Move rwd templates to base
justinbeaty Oct 20, 2024
30c42a8
Pretty sure these are obsolete template files
justinbeaty Oct 20, 2024
d739384
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 21, 2024
9c56a21
fix
justinbeaty Oct 21, 2024
6b2893f
working on templates with two forms, temp...
justinbeaty Oct 21, 2024
5ae2781
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 21, 2024
30b1310
Created new Mage_Eav_Block_Widget_Form in the spirit of Mage_Adminhtm…
justinbeaty Oct 22, 2024
ef361ed
phpstan
justinbeaty Oct 23, 2024
319eb68
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 23, 2024
c94a432
Fix Varien.DateElement call, however value isn't saving, will investi…
justinbeaty Oct 23, 2024
c2db77b
phpcs
justinbeaty Oct 23, 2024
8663a04
Fieldset CSS spacing
justinbeaty Oct 23, 2024
fe3da46
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 23, 2024
6b99b5b
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 29, 2024
cd09a2d
Fix region select, support use of data attribute
justinbeaty Oct 29, 2024
f6bf992
Fix date input
justinbeaty Oct 29, 2024
0f587b6
Allow set attribute set for not logged in customer
justinbeaty Oct 29, 2024
be74bff
Move install script to maho_setup
justinbeaty Oct 29, 2024
23d6ab2
Misc customer group edit changes
justinbeaty Oct 29, 2024
3ef4244
Fix for using the correct object in merged forms
justinbeaty Oct 29, 2024
63e5034
safer attribute set id getter
justinbeaty Oct 29, 2024
d052306
move some logic around
justinbeaty Oct 29, 2024
9379a0c
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Oct 29, 2024
58d73ff
phpstan baseline
justinbeaty Oct 29, 2024
691d23a
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 31, 2024
2618a34
updated baseline
fballiano Oct 31, 2024
c6d3c76
remove hardcoded attribute set ids
justinbeaty Oct 31, 2024
57a7b0d
Merge branch 'topic-eav-grid-maho' of github.com:justinbeaty/maho int…
justinbeaty Oct 31, 2024
aff0235
Merge branch 'main' into topic-eav-grid-maho
fballiano Oct 31, 2024
b450e39
PHPCS
fballiano Oct 31, 2024
b2668f1
Install script
justinbeaty Nov 1, 2024
3c5130f
Integrating changes since PR was originally created in OM
justinbeaty Nov 2, 2024
cee5600
Integrating changes since PR was originally created in OM
justinbeaty Nov 2, 2024
e798580
Make Mage_Adminhtml_Catalog_Product_SetController more like generic one
justinbeaty Nov 2, 2024
f4bc67f
use consistent registry key
justinbeaty Nov 2, 2024
a9f7ae7
PHPStan
justinbeaty Nov 2, 2024
8f20977
camelCase
justinbeaty Nov 2, 2024
ece8279
Use ADMIN_RESOURCE const
justinbeaty Nov 2, 2024
ed37d4c
misc
justinbeaty Nov 2, 2024
7326dc1
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Nov 2, 2024
56a1437
ref OM 1544
justinbeaty Nov 2, 2024
303c2e6
Make Mage_Adminhtml_Catalog_Product_AttributeController more like gen…
justinbeaty Nov 2, 2024
011261f
Ref OM 2875 + simplify logic
justinbeaty Nov 3, 2024
4a9c44f
Consolidate logic in eav helper, deprecate methods
justinbeaty Nov 3, 2024
ed8e6df
Big refactor
justinbeaty Nov 5, 2024
ac849aa
add setTemplateIfExists method
justinbeaty Nov 23, 2024
be4ed29
Big refactor part 2
justinbeaty Nov 23, 2024
e8fa727
Merge branch 'main' into topic-eav-grid-maho
justinbeaty Nov 23, 2024
9044528
templates
justinbeaty Nov 23, 2024
84f37de
Use match expression
justinbeaty Nov 23, 2024
4cad548
Some fixes
justinbeaty Nov 23, 2024
a69ba7b
avoid loading collection in loop
justinbeaty Nov 23, 2024
c2f2f84
Fixes
justinbeaty Nov 24, 2024
2b5c4d0
PHPStan
justinbeaty Nov 24, 2024
fae23a8
phpcs, rector
justinbeaty Nov 24, 2024
5d3fcf2
copyright
justinbeaty Nov 24, 2024
6c0b4d5
phpcs
justinbeaty Nov 24, 2024
72c2ac3
Merge branch 'main' into topic-eav-grid-maho
fballiano Nov 24, 2024
690824d
Merge branch 'main' into topic-eav-grid-maho
fballiano Nov 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 23 additions & 137 deletions .phpstan.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,6 @@ parameters:
count: 1
path: app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php

-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 1
path: app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php

-
message: '#^Method Mage_Adminhtml_Controller_Action\:\:_setForcedFormKeyActions\(\) invoked with 2 parameters, 1 required\.$#'
identifier: arguments.count
Expand Down Expand Up @@ -2467,34 +2461,22 @@ parameters:
path: app/code/core/Mage/Customer/Block/Account/Navigation.php

-
message: '#^Method Mage_Customer_Block_Address_Edit\:\:getCountryId\(\) should return int but returns string\.$#'
identifier: return.type
count: 1
path: app/code/core/Mage/Customer/Block/Address/Edit.php

-
message: '#^Return type \(int\) of method Mage_Customer_Block_Address_Edit\:\:getCountryId\(\) should be compatible with return type \(string\) of method Mage_Directory_Block_Data\:\:getCountryId\(\)$#'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Customer/Block/Address/Edit.php

-
message: '#^Method Mage_Customer_Block_Form_Register\:\:getCountryId\(\) should return int but returns string\.$#'
message: '#^Method Mage_Customer_Block_Newsletter\:\:getAction\(\) should return Mage_Core_Controller_Varien_Action but returns string\.$#'
identifier: return.type
count: 1
path: app/code/core/Mage/Customer/Block/Form/Register.php
path: app/code/core/Mage/Customer/Block/Newsletter.php

-
message: '#^Return type \(int\) of method Mage_Customer_Block_Form_Register\:\:getCountryId\(\) should be compatible with return type \(string\) of method Mage_Directory_Block_Data\:\:getCountryId\(\)$#'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Customer/Block/Form/Register.php
message: '#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\:\:getAllOptions\(\) invoked with 1 parameter, 0 required\.$#'
identifier: arguments.count
count: 2
path: app/code/core/Mage/Customer/Helper/Address.php

-
message: '#^Method Mage_Customer_Block_Newsletter\:\:getAction\(\) should return Mage_Core_Controller_Varien_Action but returns string\.$#'
identifier: return.type
count: 1
path: app/code/core/Mage/Customer/Block/Newsletter.php
message: '#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\:\:getAllOptions\(\) invoked with 1 parameter, 0 required\.$#'
identifier: arguments.count
count: 2
path: app/code/core/Mage/Customer/Helper/Data.php

-
message: '#^Property Mage_Customer_Helper_Data\:\:\$_customer \(Mage_Customer_Model_Customer\) in empty\(\) is not falsy\.$#'
Expand Down Expand Up @@ -4830,24 +4812,6 @@ parameters:
count: 19
path: app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 2
path: app/design/adminhtml/default/default/template/catalog/product/attribute/new/created.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/catalog/product/attribute/set/main.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 5
path: app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/add.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Main\.$#'
identifier: method.protected
Expand Down Expand Up @@ -5004,6 +4968,18 @@ parameters:
count: 63
path: app/design/adminhtml/default/default/template/downloadable/sales/order/view/items/renderer/downloadable.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Eav_Block_Adminhtml_Attribute_Set_Add\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/eav/attribute/set/add.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Eav_Block_Adminhtml_Attribute_Set_Edit\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/eav/attribute/set/edit.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -6306,12 +6282,6 @@ parameters:
count: 10
path: app/design/frontend/base/default/template/checkout/multishipping/success.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 4
path: app/design/frontend/base/default/template/checkout/onepage/billing.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -6576,42 +6546,6 @@ parameters:
count: 4
path: app/design/frontend/base/default/template/customer/balance.phtml

-
message: '#^Variable \$action might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$address might not be defined\.$#'
identifier: variable.undefined
count: 2
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$countries might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$data might not be defined\.$#'
identifier: variable.undefined
count: 12
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$primaryTypes might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 50
path: app/design/frontend/base/default/template/customer/form/address.phtml

-
message: '#^Variable \$action might not be defined\.$#'
identifier: variable.undefined
Expand All @@ -6633,7 +6567,7 @@ parameters:
-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 36
count: 23
path: app/design/frontend/base/default/template/customer/form/edit.phtml

-
Expand All @@ -6648,12 +6582,6 @@ parameters:
count: 16
path: app/design/frontend/base/default/template/customer/form/newsletter.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/base/default/template/customer/form/register.phtml

-
message: '#^PHPDoc tag @var contains unresolvable type\.$#'
identifier: varTag.unresolvableType
Expand Down Expand Up @@ -7572,42 +7500,6 @@ parameters:
count: 3
path: app/design/frontend/rwd/default/template/customer/account/navigation.phtml

-
message: '#^Variable \$action might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$address might not be defined\.$#'
identifier: variable.undefined
count: 2
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$countries might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$data might not be defined\.$#'
identifier: variable.undefined
count: 12
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$primaryTypes might not be defined\.$#'
identifier: variable.undefined
count: 1
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 51
path: app/design/frontend/rwd/default/template/customer/form/address.phtml

-
message: '#^Variable \$action might not be defined\.$#'
identifier: variable.undefined
Expand All @@ -7626,12 +7518,6 @@ parameters:
count: 13
path: app/design/frontend/rwd/default/template/customer/form/confirmation.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 36
path: app/design/frontend/rwd/default/template/customer/form/edit.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down
18 changes: 14 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
* @copyright Copyright (c) 2022-2023 The OpenMage Contributors (https://openmage.org)
* @copyright Copyright (c) 2024 Maho (https://mahocommerce.com)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand All @@ -15,13 +16,22 @@
* @category Mage
* @package Mage_Adminhtml
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute extends Mage_Adminhtml_Block_Widget_Grid_Container
class Mage_Adminhtml_Block_Catalog_Product_Attribute extends Mage_Eav_Block_Adminhtml_Attribute
{
public function __construct()
{
$this->entityType = Mage::registry('entity_type');

$this->_blockGroup = 'adminhtml';
$this->_controller = 'catalog_product_attribute';
$this->_headerText = Mage::helper('catalog')->__('Manage Attributes');
$this->_addButtonLabel = Mage::helper('catalog')->__('Add New Attribute');
parent::__construct();

$this->_headerText = $this->__(
'Manage %s Attributes',
Mage::helper('eav')->formatTypeCode($this->entityType->getEntityTypeCode())
);

$this->_addButtonLabel = Mage::helper('eav')->__('Add New Attribute');

Mage_Adminhtml_Block_Widget_Grid_Container::__construct();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,78 +16,42 @@
* @category Mage
* @package Mage_Adminhtml
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Eav_Block_Adminhtml_Attribute_Edit
{
public function __construct()
{
$this->entityType = Mage::registry('entity_type');
$this->entityAttribute = Mage::registry('entity_attribute');

$this->_objectId = 'attribute_id';
$this->_blockGroup = 'adminhtml';
$this->_controller = 'catalog_product_attribute';

parent::__construct();
Mage_Adminhtml_Block_Widget_Form_Container::__construct();

if ($this->getRequest()->getParam('popup')) {
$this->_removeButton('back');
$this->_addButton(
'close',
[
'label' => Mage::helper('catalog')->__('Close Window'),
'class' => 'cancel',
'onclick' => 'window.close()',
'level' => -1
]
);
$this->_addButton('close', [
'label' => Mage::helper('catalog')->__('Close Window'),
'class' => 'cancel',
'onclick' => 'window.close()',
'level' => -1
]);
} else {
$this->_addButton(
'save_and_edit_button',
[
'label' => Mage::helper('catalog')->__('Save and Continue Edit'),
'onclick' => 'saveAndContinueEdit()',
'class' => 'save'
],
100
);
$this->_addButton('save_and_edit_button', [
'label' => Mage::helper('catalog')->__('Save and Continue Edit'),
'onclick' => 'saveAndContinueEdit()',
'class' => 'save'
], 100);
}

$this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute'));
$this->_updateButton('save', 'onclick', 'saveAttribute()');

if (!Mage::registry('entity_attribute')->getIsUserDefined()) {
$this->_removeButton('delete');
if ($this->entityAttribute->getIsUserDefined()) {
$this->_updateButton('delete', 'label', $this->__('Delete Attribute'));
} else {
$this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete Attribute'));
}
}

/**
* @return string
*/
#[\Override]
public function getHeaderText()
{
if (Mage::registry('entity_attribute')->getId()) {
$frontendLabel = Mage::registry('entity_attribute')->getFrontendLabel();
if (is_array($frontendLabel)) {
$frontendLabel = $frontendLabel[0];
}
return Mage::helper('catalog')->__('Edit Product Attribute "%s"', $this->escapeHtml($frontendLabel));
$this->_removeButton('delete');
}
return Mage::helper('catalog')->__('New Product Attribute');
}

/**
* @return string
*/
public function getValidationUrl()
{
return $this->getUrl('*/*/validate', ['_current' => true]);
}

/**
* @return string
*/
#[\Override]
public function getSaveUrl()
{
return $this->getUrl('*/' . $this->_controller . '/save', ['_current' => true, 'back' => null]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
* @category Mage
* @package Mage_Adminhtml
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Form extends Mage_Eav_Block_Adminhtml_Attribute_Edit_Form
{
#[\Override]
protected function _prepareForm()
{
$form = new Varien_Data_Form(['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']);
$form->setUseContainer(true);
$this->setForm($form);
return parent::_prepareForm();
}
}
Loading
Loading