Tidied up tabs and template display
This commit is contained in:
+2
-2
@@ -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
@@ -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&mode=$template",
|
||||
get_string($template, 'data'));
|
||||
$row[] = new tabobject($template, "templates.php?d=$data->id&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);
|
||||
|
||||
?>
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
|
||||
echo '<form id="tempform" action="templates.php?d='.$data->id.'&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');
|
||||
|
||||
Reference in New Issue
Block a user