You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
? i18n._t('Admin.ARCHIVECONFIRMMESSAGE','Are you sure you want to archive this record?')
: i18n._t('Admin.DELETECONFIRMMESSAGE','Are you sure you want to delete this record?');
I would rather have some kind of data attribute that can be set on the button itself. In general, having "confirmable" actions handled at core level would be great, but that's another topic...
This way, the button can provide the message itself or even make it user configurable if needed. Much better than hardcoded in js.
Toasts message should rely on X-Status instead
Additional Context
No response
Validations
Check that there isn't already an issue that reports the same bug
Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
The text was updated successfully, but these errors were encountered:
Thanks for reporting this.
If you'd like to raise a PR to resolve this I'd be very grateful. This almost certainly affects CMS 4 as well, so please target 1.13 if you do open a PR to resolve this.
Module version(s) affected
5.1.x
Description
Currently, when you unlink a record, you get a warning message saying "Are you sure you want to delete this record?"
This is obviously NOT the case since you only UNLINK the record.
The toast message says "deleted" afterwards
How to reproduce
In model admin
Have a record with a has_many relation
Unlink a record
Get the message and see the toast
Possible Solution
This seems to be done on the js side of things
silverstripe-admin/client/src/legacy/GridField.js
Lines 562 to 564 in 0c5de61
I would rather have some kind of data attribute that can be set on the button itself. In general, having "confirmable" actions handled at core level would be great, but that's another topic...
This way, the button can provide the message itself or even make it user configurable if needed. Much better than hardcoded in js.
Toasts message should rely on X-Status instead
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: