Some useful parameters are in %$routeparams:
${ $routeparams->{EmsgRef} }
- $routeparams->{SayOptionalCapital}
+ $routeparams->{SayRequiredCapacity}
The results are returned there:
$routeparams->{LossPerLeaguePct}
$routeparams->{MaxMass}
$routeparams
</%args>
+<%method advanced>
+<strong>Advanced options - you may leave these blank:</strong>
+<p>
+</%method>
+
+% if (!$routeparams->{SayRequiredCapacity}) {
+<& SELF:advanced &>
+% }
+
<table><tr><td>
Vessel or capacity:
size=40
</&>
+</table>
+% if ($routeparams->{SayRequiredCapacity}) {
+<& SELF:advanced &>
+% }
+<table><tr>
+
+<td>Available capital:
+
+<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
+ thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef},
+ helpref => 'capital',
+ onresults => sub { ($routeparams->{MaxCapital})= @_; }
+ &>
+ size=9
+</&>
+
<td>
size=9
</&>
-</table>
-<table><tr>
-
-<td>Available capital<%
- $routeparams->{SayOptionalCapital} ? ' (optional)' : '' %>:
-
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
- thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef},
- helpref => 'capital',
- onresults => sub { ($routeparams->{MaxCapital})= @_; }
- &>
- size=9
-</&>
-
<% $m->content %>
</table>
% my $routeparams= { EmsgRef => \$emsg };
% if (!$qa->{Dropdowns}) {
-<strong>Advanced options - you may leave these blank:</strong>
-<p>
-
<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &>
% } #---------- end of dropdowns, now common middle of page code ----------
my @islandids;
my $qa= \%ARGS;
-my $routeparams= { EmsgRef => \$emsg, SayOptionalCapital => 1 };
+my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 };
my $maxdist;
</%perl>
&>
<&| enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &>
+<td>
+
+
<td>
Maximum distance:
<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ml',
thingstring => 'distance', emsgstore => \$emsg,
onresults => sub { ($maxdist)= @_; } &>
+ size=10
</&>
</&>