Skip to content

Commit 0edd746

Browse files
author
Roman Leshchenko
committed
MAGETWO-92725: Incorrect group actions behavior
1 parent c3edc94 commit 0edd746

File tree

1 file changed

+19
-0
lines changed
  • app/code/Magento/Customer/Block/Adminhtml/Group

1 file changed

+19
-0
lines changed

app/code/Magento/Customer/Block/Adminhtml/Group/Edit.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public function __construct(
5757
* Update Save and Delete buttons. Remove Delete button if group can't be deleted.
5858
*
5959
* @return void
60+
* @throws \Magento\Framework\Exception\LocalizedException
61+
* @throws \Magento\Framework\Exception\NoSuchEntityException
6062
*/
6163
protected function _construct()
6264
{
@@ -68,6 +70,23 @@ protected function _construct()
6870

6971
$this->buttonList->update('save', 'label', __('Save Customer Group'));
7072
$this->buttonList->update('delete', 'label', __('Delete Customer Group'));
73+
$this->buttonList->update(
74+
'delete',
75+
'onclick',
76+
sprintf(
77+
"deleteConfirm('%s','%s', %s)",
78+
'Are you sure?',
79+
$this->getDeleteUrl(),
80+
json_encode(
81+
[
82+
'action' => '',
83+
'data' => [
84+
'form_key' => $this->getFormKey()
85+
]
86+
]
87+
)
88+
)
89+
);
7190

7291
$groupId = $this->coreRegistry->registry(RegistryConstants::CURRENT_GROUP_ID);
7392
if (!$groupId || $this->groupManagement->isReadonly($groupId)) {

0 commit comments

Comments
 (0)