File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Customer \Controller \RegistryConstants ;
11
11
12
12
/**
13
- * Customer edit block
13
+ * @deprecated for UiComponent replacement
14
+ * @see app/code/Magento/Customer/view/base/ui_component/customer_form.xml
14
15
*/
15
16
class Edit extends \Magento \Backend \Block \Widget \Form \Container
16
17
{
@@ -115,12 +116,13 @@ protected function _construct()
115
116
116
117
if ($ customerId ) {
117
118
$ url = $ this ->getUrl ('customer/customer/invalidateToken ' , ['customer_id ' => $ customerId ]);
118
- $ deleteConfirmMsg = __ ("Are you sure you want to revoke the customer\ 's tokens? " );
119
+ $ deleteConfirmMsg = __ ("Are you sure you want to revoke the customer's tokens? " );
119
120
$ this ->buttonList ->add (
120
121
'invalidate_token ' ,
121
122
[
122
123
'label ' => __ ('Force Sign-In ' ),
123
- 'onclick ' => 'deleteConfirm( \'' . $ deleteConfirmMsg . '\', \'' . $ url . '\') ' ,
124
+ 'onclick ' => 'deleteConfirm( \'' . $ this ->escapeJs ($ this ->escapeHtml ($ deleteConfirmMsg )) .
125
+ '\', \'' . $ url . '\') ' ,
124
126
'class ' => 'invalidate-token '
125
127
],
126
128
10
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ public function getButtonData()
21
21
$ customerId = $ this ->getCustomerId ();
22
22
$ data = [];
23
23
if ($ customerId ) {
24
- $ deleteConfirmMsg = __ ("Are you sure you want to revoke the customer\ 's tokens? " );
24
+ $ deleteConfirmMsg = __ ("Are you sure you want to revoke the customer's tokens? " );
25
25
$ data = [
26
26
'label ' => __ ('Force Sign-In ' ),
27
27
'class ' => 'invalidate-token ' ,
28
- 'on_click ' => 'deleteConfirm( \'' . $ deleteConfirmMsg . '\', \'' . $ this ->getInvalidateTokenUrl () .
29
- '\') ' ,
28
+ 'on_click ' => 'deleteConfirm(" ' . $ deleteConfirmMsg . '", " ' . $ this ->getInvalidateTokenUrl () . '") ' ,
30
29
'sort_order ' => 65 ,
31
30
];
32
31
}
Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ protected function _construct()
65
65
]
66
66
);
67
67
68
- $ deleteConfirmMsg = __ ("Are you sure you want to revoke the user\ 's tokens? " );
68
+ $ deleteConfirmMsg = __ ("Are you sure you want to revoke the user's tokens? " );
69
69
$ this ->addButton (
70
70
'invalidate ' ,
71
71
[
72
72
'label ' => __ ('Force Sign-In ' ),
73
73
'class ' => 'invalidate-token ' ,
74
- 'onclick ' => "deleteConfirm(' " . $ deleteConfirmMsg . "', ' " . $ this ->getInvalidateUrl () . "') " ,
74
+ 'onclick ' => "deleteConfirm(' " . $ this ->escapeJs ($ this ->escapeHtml ($ deleteConfirmMsg )) .
75
+ "', ' " . $ this ->getInvalidateUrl () . "') " ,
75
76
]
76
77
);
77
78
}
You can’t perform that action at this time.
0 commit comments