Skip to content
Snippets Groups Projects
Commit d7705ea6 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #89356 by RobRoy: only show labels when necessary.

parent 91fa9127
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -2118,16 +2118,18 @@ function user_user_operations() {
$remove_roles['remove_role-'. $key] = $value;
}
$role_operations = array(
t('Add a role to the selected users') => array(
'label' => $add_roles,
),
t('Remove a role from the selected users') => array(
'label' => $remove_roles,
),
);
if (count($roles)) {
$role_operations = array(
t('Add a role to the selected users') => array(
'label' => $add_roles,
),
t('Remove a role from the selected users') => array(
'label' => $remove_roles,
),
);
$operations += $role_operations;
$operations += $role_operations;
}
}
// If the form has been posted, we need to insert the proper data for role editing if necessary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment