This Mason component generates entry fields for route planning
advanced parameters (capacity limits, etc).
- The results are returned in $routeparams:
+ Some useful parameters are in %$routeparams:
${ $routeparams->{EmsgRef} }
+ $routeparams->{SayRequiredCapacity}
+ The results are returned there:
$routeparams->{LossPerLeaguePct}
$routeparams->{MaxMass}
$routeparams->{MaxVolume}
$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:
-
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
- thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef},
- helpref => 'capital',
- onresults => sub { ($routeparams->{MaxCapital})= @_; }
- &>
- size=9
-</&>
+<% $m->content %>
</table>