Merged fixes from 1.8 stable for role menu fixes MDL-8558

This commit is contained in:
moodler
2007-02-18 13:01:15 +00:00
parent e16811566a
commit 08c7d26024
4 changed files with 23 additions and 14 deletions
+6 -3
View File
@@ -12,11 +12,14 @@
$submitlabel = get_string('savechanges');
}
if ($action == 'view') {
?>
<div align="right">
<a href="manage.php?roleid=<?php p($roleid); ?>&amp;action=duplicate"><?php print_string('duplicaterole'); ?></a>
<div class="duplicaterole">
<a href="manage.php?roleid=<?php p($roleid); ?>&amp;action=duplicate"><?php print_string('duplicaterole', 'role'); ?></a>
</div>
<?php
}
?>
<form id="rolesform" action="manage.php" method="post">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
+8 -11
View File
@@ -334,18 +334,15 @@
break;
}
echo '<div align="center" class="selector">';
echo '<div class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
echo '<form style="display:inline;" id="switchrole" action="manage.php" method="get">';
echo '<input type="hidden" name="action" value="view" />';
choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
echo '</form>';
echo '<form style="display:inline;" id="editrole" action="manage.php" method="get">';
echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
echo '<input type="hidden" name="action" value="edit" />';
echo '<input type="submit" value="'.get_string('edit').'" />';
echo '</form>';
popup_form('manage.php?action=view&amp;roleid=', $roleoptions, 'switchrole', $roleid, '', '', '',
false, 'self', get_string('selectrole', 'role').': ');
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
print_single_button('manage.php', $options, get_string('edit'));
}
echo '</div>';
+1
View File
@@ -49,6 +49,7 @@ $string['currentrole'] = 'Current role';
$string['defaultrole'] = 'Default role';
$string['defineroles'] = 'Define roles';
$string['deleterolesure'] = 'Are you sure that you want to delete role \"$a->name ($a->shortname)\"?</p><p>Currently this role is assigned to $a->count users.';
$string['duplicaterole'] = 'Duplicate this role';
$string['editrole'] = 'Edit role';
$string['errorbadrolename'] = 'Incorrect role name';
$string['errorbadroleshortname'] = 'Incorrect role name';
+8
View File
@@ -738,6 +738,10 @@ body#admin-blocks table#incompatible th.c0 {
margin-top: 1em;
}
#admin-roles-manage .duplicaterole {
text-align: right;
}
#admin-roles-manage .singlebutton,
#admin-roles-allowoverride .singlebutton,
#admin-roles-allowassign .singlebutton {
@@ -745,6 +749,10 @@ body#admin-blocks table#incompatible th.c0 {
text-align:center;
}
#admin-roles-manage .selector {
text-align:center;
}
.rolecap .inherit,
.rolecap .allow,
.rolecap .prevent,