Skip to content

Commit acb8fa2

Browse files
committed
chg: [users:index] Added confirmation modal before changing disabled state for users
1 parent f4f17a1 commit acb8fa2

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

templates/Users/index.php

+21-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,27 @@
5454
return true;
5555
},
5656
],
57-
'skip_full_reload' => true
57+
'skip_full_reload' => true,
58+
'confirm' => [
59+
'enable' => [
60+
'titleHtml' => __('Confirm disabling the user?'),
61+
'type' => 'confirm-warning',
62+
'bodyHtml' => __('You\'re about to change the state of the user {{0}}.'),
63+
'confirmText' => __('Disable user'),
64+
'arguments' => [
65+
'bodyHtml' => ['individual.email'],
66+
]
67+
],
68+
'disable' => [
69+
'titleHtml' => __('Confirm enabling the user?'),
70+
'type' => 'confirm-success',
71+
'bodyHtml' => __('You\'re about to change the state of the user {{0}}.'),
72+
'confirmText' => __('Enable user'),
73+
'arguments' => [
74+
'bodyHtml' => ['individual.email'],
75+
]
76+
]
77+
]
5878
]
5979
],
6080
[
@@ -168,5 +188,4 @@
168188
]
169189
]
170190
]);
171-
echo '</div>';
172191
?>

0 commit comments

Comments
 (0)