More tidy-ups

This commit is contained in:
moodler
2006-09-24 14:35:45 +00:00
parent 8173517648
commit 9e38e94047
2 changed files with 18 additions and 22 deletions
+2 -22
View File
@@ -12,29 +12,9 @@
$submitlabel = get_string('savechanges');
}
?>
<table cellpadding="9" cellspacing="0" >
<?php
if ($action == 'view') { ?>
<tr valign="top">
<td align="right"><?php print_string('selectrole', 'role') ?>:</td>
<td><table><tr>
<td><form name="switchrole" action="manage.php" method="get">
<input type="hidden" name="action" value="view" />
<?php choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()') ?>
</form></td>
<td><form name="editrole" action="manage.php" method="get">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="action" value="edit" />
<input type="submit" value="<?php print_string('edit') ?>" />
</form></td>
</tr></table>
</td>
</tr>
<?php
}
?>
<table cellpadding="9" cellspacing="0" align="center">
<form name="rolesform" action="manage.php" method="post">
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
@@ -74,7 +54,7 @@
<?php print_heading(get_string('permissions','role')) ?>
<table class="rolecap">
<table class="rolecap" align="center">
<tr>
<th class="name" align="left"><?php print_string('capability','role') ?></th>
+16
View File
@@ -287,6 +287,22 @@
print_heading(get_string('editrole', 'role'));
break;
}
echo '<div align="center" class="selector">';
if ($action == 'view') {
echo get_string('selectrole', 'role').': ';
echo '<form style="display:inline;" name="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;" name="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>';
}
echo '</div>';
print_simple_box_start('center');
include_once('manage.html');
print_simple_box_end();