X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=yarrg%2Fweb%2Fenter_advrouteopts;h=95a71433ddbf2e1ec4d18e9381131e41c937dfa9;hb=18bff492748999fe28f474cea854f0fd26d6394f;hp=1e037330197161c5ede0342057fc08f31b780c76;hpb=64f37d1c80bfd082dab4a11db206515890af6f44;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/enter_advrouteopts b/yarrg/web/enter_advrouteopts index 1e03733..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 +<%method advanced> +Advanced options - you may leave these blank: +

+ + +% 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,17 +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 %>