]> git.mjollnir.org Git - moodle.git/commitdiff
More tidy-ups
authormoodler <moodler>
Sun, 24 Sep 2006 14:35:45 +0000 (14:35 +0000)
committermoodler <moodler>
Sun, 24 Sep 2006 14:35:45 +0000 (14:35 +0000)
admin/roles/manage.html
admin/roles/manage.php

index eb5475c95a648dcc166e4daa914e60769499201b..c9b0189c59aadc24b0f34ca4c8a6a09962547362 100755 (executable)
             $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>
index 8e42874baf971c3ef1651a753736ba936de53034..59c96755f737f5aa0c3c02105663e9aac2be46f4 100755 (executable)
                 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();