X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_advrouteopts;h=95a71433ddbf2e1ec4d18e9381131e41c937dfa9;hb=05a607330cc73832ccc778cd10f69cbac8e6dba3;hp=2a5eff0e5c5c677334ec055b709d1c566cfdb4f6;hpb=5df1a21a8f7ad18ade3a97b9ccf26bdcf335edd2;p=ypp-sc-tools.main.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 +<%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,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 %>