Tidied up tabs and template display

This commit is contained in:
moodler
2007-03-05 07:15:23 +00:00
parent 7aa951a2cc
commit 0b22495f37
3 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -255,7 +255,7 @@
//form goes here first in case add template is empty
echo '<form enctype="multipart/form-data" action="edit.php" method="post">';
echo '<fieldset>';
echo '<div>';
echo '<input name="d" value="'.$data->id.'" type="hidden" />';
echo '<input name="rid" value="'.$rid.'" type="hidden" />';
echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />';
@@ -295,7 +295,7 @@
}
echo '</div>';
print_simple_box_end();
echo '</fieldset></form>';
echo '</div></form>';
/// Upload records section. Only for teachers and the admin.
+5 -6
View File
@@ -66,9 +66,7 @@
}
$tabs[] = $row;
/*****************************
* stolen code from quiz report
*****************************/
if ($currenttab == 'templates' and isset($mode)) {
$inactive[] = 'templates';
$templatelist = array ('listtemplate', 'singletemplate', 'addtemplate', 'rsstemplate', 'csstemplate', 'jstemplate');
@@ -76,18 +74,19 @@
$row = array();
$currenttab ='';
foreach ($templatelist as $template) {
$row[] = new tabobject($template, "templates.php?d=$data->id&amp;mode=$template",
get_string($template, 'data'));
$row[] = new tabobject($template, "templates.php?d=$data->id&amp;mode=$template", get_string($template, 'data'));
if ($template == $mode) {
$currenttab = $template;
}
}
$tabs[] = $row;
$active[] = 'templates';
}
/// Print out the tabs and continue!
print_tabs($tabs, $currenttab, $inactive);
print_tabs($tabs, $currenttab, $inactive, $active);
?>
+2 -2
View File
@@ -170,7 +170,7 @@
echo '<form id="tempform" action="templates.php?d='.$data->id.'&amp;mode='.$mode.'" method="post">';
echo '<fieldset class="invisiblefieldset">';
echo '<div>';
echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />';
// Print button to autogen all forms, if all templates are empty
@@ -291,7 +291,7 @@
print_simple_box_end();
echo '</fieldset>';
echo '</div>';
echo '</form>';
if ($usehtmleditor) {
use_html_editor('template');