[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Thu, 15 May 2003 16:14:52 -0000
bowersj2 Thu May 15 12:14:52 2003 EDT
Modified files:
/loncom/interface lonhelper.pm
Log:
Change the next/previous formatting, drop some of the extra space.
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.29 loncom/interface/lonhelper.pm:1.30
--- loncom/interface/lonhelper.pm:1.29 Wed May 14 16:16:56 2003
+++ loncom/interface/lonhelper.pm Thu May 15 12:14:52 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.29 2003/05/14 20:16:56 bowersj2 Exp $
+# $Id: lonhelper.pm,v 1.30 2003/05/15 16:14:52 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -553,11 +553,17 @@
<h2><i>$stateTitle</i></h2>
HEADER
+ $result .= "<table><tr><td rowspan='2' valign='top'>";
+
if (!$state->overrideForm()) {
$result .= $self->_saveVars();
}
- $result .= $state->render() . "<p> </p>";
+ $result .= $state->render();
+
+ $result .= "</td><td valign='top'>";
+ # Warning: Copy and pasted from below, because it's too much trouble to
+ # turn this into a subroutine
if (!$state->overrideForm()) {
$result .= '<center>';
if ($self->{STATE} ne $self->{START_STATE}) {
@@ -568,9 +574,30 @@
$result .= "<a href=\"$returnPage\">End Helper</a>";
}
else {
- $result .= '<input name="back" type="button" ';
+ $result .= '<nobr><input name="back" type="button" ';
$result .= 'value="<- Previous" onclick="history.go(-1)" /> ';
- $result .= '<input name="SUBMIT" type="submit" value="Next ->" />';
+ $result .= '<input name="SUBMIT" type="submit" value="Next ->" /></nobr> ';
+ }
+ $result .= "</center>\n";
+ }
+
+ $result .= "</td></tr><tr><td valign='bottom'>";
+
+ # Warning: Copy and pasted from above, because it's too much trouble to
+ # turn this into a subroutine
+ if (!$state->overrideForm()) {
+ $result .= '<center>';
+ if ($self->{STATE} ne $self->{START_STATE}) {
+ #$result .= '<input name="SUBMIT" type="submit" value="<- Previous" /> ';
+ }
+ if ($self->{DONE}) {
+ my $returnPage = $self->{RETURN_PAGE};
+ $result .= "<a href=\"$returnPage\">End Helper</a>";
+ }
+ else {
+ $result .= '<nobr><input name="back" type="button" ';
+ $result .= 'value="<- Previous" onclick="history.go(-1)" /> ';
+ $result .= '<input name="SUBMIT" type="submit" value="Next ->" /></nobr>';
}
$result .= "</center>\n";
}
@@ -579,6 +606,8 @@
# $result .= "|$key| -> " . $self->{VARS}->{$key} . "<br />";
#}
+ $result .= "</td></tr></table>";
+
$result .= <<FOOTER;
</td>
</tr>
@@ -684,7 +713,6 @@
push @{$self->{ELEMENTS}}, $element;
}
-use Data::Dumper;
sub render {
my $self = shift;
my @results = ();