Skip to content

Commit f9ff891

Browse files
committed
Update the error message for changeit action
1 parent 5d3de27 commit f9ff891

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/js/_enqueues/admin/common.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,9 +1350,15 @@ $( function() {
13501350
event.stopPropagation();
13511351
$( 'html, body' ).animate( { scrollTop: 0 } );
13521352

1353+
var noSelectionMessages = {
1354+
'changeit': __( 'Please select a role to change.' ),
1355+
'bulk_action': __( 'Please select a bulk action to perform.' )
1356+
};
1357+
13531358
var errorMessage = value !== '-1' ?
13541359
__( 'Please select at least one item to perform this action on.' ) :
1355-
__( 'Please select a bulk action to perform.' );
1360+
noSelectionMessages[ submitterName ] || noSelectionMessages['bulk_action'];
1361+
13561362
addAdminNotice( {
13571363
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
13581364
type: 'error',

0 commit comments

Comments
 (0)