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

- Patch #393406 by michaelfavia, Freso, catch, stBorchert, David_Rothstein,...

- Patch #393406 by michaelfavia, Freso, catch, stBorchert, David_Rothstein, ksenzee: improve role administration page.
parent c8fd7588
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
......@@ -868,14 +868,14 @@ function theme_user_admin_new_role($variables) {
$header = array(t('Name'), array('data' => t('Operations'), 'colspan' => 2));
foreach (user_roles() as $rid => $name) {
$edit_permissions = l(t('edit permissions'), 'admin/config/people/permissions/' . $rid);
if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
$rows[] = array($name, l(t('edit role'), 'admin/config/people/roles/edit/' . $rid), $edit_permissions);
if (in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
$rows[] = array(t('!name %locked', array('!name' => $name, '%locked' => t('(locked)'))), '', $edit_permissions);
}
else {
$rows[] = array($name, t('locked'), $edit_permissions);
$rows[] = array($name, l(t('edit role'), 'admin/config/people/roles/edit/' . $rid), $edit_permissions);
}
}
$rows[] = array(drupal_render($form['name']), array('data' => drupal_render($form['submit']), 'colspan' => 2));
$rows[] = array(array('data' => drupal_render($form['name']) . drupal_render($form['submit']), 'colspan' => 3, 'class' => 'edit-name'));
$output = drupal_render_children($form);
$output .= theme('table', array('header' => $header, 'rows' => $rows));
......
......@@ -29,6 +29,18 @@
padding-bottom: .5em;
}
/**
* Override default textfield float to put the "Add role" button next to
* the input textfield.
*/
#user-admin-new-role td.edit-name {
clear: both;
}
#user-admin-new-role .form-item-name {
float: left;
margin-right: 1em;
}
/* Generated by user.module but used by profile.module: */
.profile {
clear: both;
......
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