Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)
* Fix: Prevent data loss in regex bulk move * prevents moving to scoped scripts with group selected for bulkedit
This commit is contained in:
@@ -1855,6 +1855,14 @@ jQuery(async () => {
|
||||
});
|
||||
|
||||
$('#bulk_regex_move_to_scoped').on('click', async () => {
|
||||
if (this_chid === undefined) {
|
||||
toastr.error(t`No character selected.`);
|
||||
return;
|
||||
}
|
||||
if (selected_group) {
|
||||
toastr.error(t`Cannot edit scoped scripts in group chats.`);
|
||||
return;
|
||||
}
|
||||
const confirm = await callGenericPopup(t`Are you sure you want to move the selected regex scripts to scoped?`, POPUP_TYPE.CONFIRM);
|
||||
if (!confirm) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user