X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_advrouteopts;h=95a71433ddbf2e1ec4d18e9381131e41c937dfa9;hb=e48954272cc534a0e90a95ecfa68feb36bcd542b;hp=2a5eff0e5c5c677334ec055b709d1c566cfdb4f6;hpb=5df1a21a8f7ad18ade3a97b9ccf26bdcf335edd2;p=ypp-sc-tools.db-live.git
diff --git a/yarrg/web/enter_advrouteopts b/yarrg/web/enter_advrouteopts
index 2a5eff0..95a7143 100644
--- a/yarrg/web/enter_advrouteopts
+++ b/yarrg/web/enter_advrouteopts
@@ -32,8 +32,10 @@
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}
@@ -47,6 +49,15 @@ $dbh
$routeparams
%args>
+<%method advanced>
+Advanced options - you may leave these blank:
+
+%method>
+
+% if (!$routeparams->{SayRequiredCapacity}) {
+<& SELF:advanced &>
+% }
+
Vessel or capacity:
@@ -60,6 +71,22 @@ Vessel or capacity:
size=40
&>
+ |
+% if ($routeparams->{SayRequiredCapacity}) {
+<& SELF:advanced &>
+% }
+
+
+Available capital:
+
+<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
+ thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef},
+ helpref => 'capital',
+ onresults => sub { ($routeparams->{MaxCapital})= @_; }
+ &>
+ size=9
+&>
+
|
@@ -75,19 +102,6 @@ Expected losses:
size=9
&>
- |
-
-
-Available capital:
-
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
- thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef},
- helpref => 'capital',
- onresults => sub { ($routeparams->{MaxCapital})= @_; }
- &>
- size=9
-&>
-
<% $m->content %>
|