version 1.174, 2009/06/12 15:31:30
|
version 1.175, 2009/06/12 17:58:22
|
Line 608 sub display {
|
Line 608 sub display {
|
|
|
if (!$state->overrideForm()) { $result.='<form name="helpform" method="post">'; } |
if (!$state->overrideForm()) { $result.='<form name="helpform" method="post">'; } |
if ($stateHelp) { |
if ($stateHelp) { |
$stateHelp = &Apache::loncommon::help_open_topic($stateHelp); |
$stateHelp = &Apache::loncommon::help_open_topic($stateHelp); |
} |
} |
$result .= <<HEADER; |
|
<table border="0" width='100%'><tr><td> |
|
<h2><i>$stateTitle</i>$stateHelp</h2> |
|
HEADER |
|
|
|
$result .= "<table cellpadding='10' width='100%'><tr><td rowspan='2' valign='top'>"; |
# Prepare buttons |
|
my $buttons; |
if (!$state->overrideForm()) { |
|
$result .= $self->_saveVars(); |
|
} |
|
$result .= $state->render(); |
|
|
|
$result .= "</td><td valign='top' align='right'>"; |
|
|
|
# Warning: Copy and pasted from below, because it's too much trouble to |
|
# turn this into a subroutine |
|
if (!$state->overrideForm()) { |
if (!$state->overrideForm()) { |
if ($self->{STATE} ne $self->{START_STATE}) { |
if ($self->{STATE} ne $self->{START_STATE}) { |
#$result .= '<input name="SUBMIT" type="submit" value="<- Previous" /> '; |
#$result .= '<input name="SUBMIT" type="submit" value="<- Previous" /> '; |
} |
} |
|
$buttons = '<p>'; # '<fieldset>'; |
if ($self->{DONE}) { |
if ($self->{DONE}) { |
my $returnPage = $self->{RETURN_PAGE}; |
my $returnPage = $self->{RETURN_PAGE}; |
$result .= "<a href=\"$returnPage\">" . &mt("End Helper") . "</a>"; |
$buttons .= '<a href="'.$returnPage.'">'.&mt('End Helper').'</a>'; |
} |
} |
else { |
else { |
$result .= '<span class="LC_nobreak"><input name="back" type="button" '; |
$buttons .= '<span class="LC_nobreak">' |
$result .= 'value="' . $previous . '" onclick="history.go(-1)" /> '; |
.'<input name="back" type="button" ' |
$result .= '<input name="SUBMIT" type="submit" value="' . $next . '" /></span>'; |
.'value="'.$previous.'" onclick="history.go(-1)" /> ' |
|
.'<input name="SUBMIT" type="submit" value="'.$next.'" />' |
|
.'</span>'; |
} |
} |
|
$buttons .= '</p>'; # '</fieldset>'; |
} |
} |
|
|
$result .= "</td></tr><tr><td valign='bottom' align='right'>"; |
|
|
|
# Warning: Copy and pasted from above, because it's too much trouble to |
|
# turn this into a subroutine |
$result .= '<h2>'.$stateTitle.$stateHelp.'</h2>'; |
|
|
|
# $result .= '<div>'; |
|
|
|
# Top buttons |
|
$result .= $buttons; |
|
|
|
# Main content of current helper screen |
if (!$state->overrideForm()) { |
if (!$state->overrideForm()) { |
if ($self->{STATE} ne $self->{START_STATE}) { |
$result .= $self->_saveVars(); |
#$result .= '<input name="SUBMIT" type="submit" value="<- Previous" /> '; |
|
} |
|
if ($self->{DONE}) { |
|
my $returnPage = $self->{RETURN_PAGE}; |
|
$result .= "<a href=\"$returnPage\">" . &mt('End Helper') . "</a>"; |
|
} |
|
else { |
|
$result .= '<span class="LC_nobreak"><input name="back" type="button" '; |
|
$result .= 'value="' . $previous . '" onclick="history.go(-1)" /> '; |
|
$result .= '<input name="SUBMIT" type="submit" value="' . $next . '" /></span>'; |
|
} |
|
} |
} |
|
$result .= $state->render(); |
|
|
|
# Bottom buttons |
|
$result .= $buttons; |
|
|
|
|
#foreach my $key (keys %{$self->{VARS}}) { |
#foreach my $key (keys %{$self->{VARS}}) { |
# $result .= "|$key| -> " . $self->{VARS}->{$key} . "<br />"; |
# $result .= "|$key| -> " . $self->{VARS}->{$key} . "<br />"; |
#} |
#} |
|
|
$result .= "</td></tr></table>"; |
# $result .= '</div>'; |
|
|
$result .= <<FOOTER; |
$result .= <<FOOTER; |
</td> |
|
</tr> |
|
</table> |
|
</form> |
</form> |
FOOTER |
FOOTER |
|
|