X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_route;h=a65ef1c5723d9360e4566152d294ac0fd1350112;hp=759c9c547cbd92f01f39a6e9bda8e900a651d6d5;hb=099cd920655c1db6da4a1a57ec3baa30d16321d7;hpb=9493637c44b0e22b2b9f72cf9e2748585064be56 diff --git a/yarrg/web/query_route b/yarrg/web/query_route index 759c9c5..a65ef1c 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -39,6 +39,7 @@ $dbh $prselector $routestring => ''; $capacitystring => ''; +$lossperleague => ''; $someresults $emsgokorprint @@ -49,6 +50,7 @@ my @archipelagoes; my @islandids; my %islandid2; my ($max_volume, $max_mass); +my $lossperleaguepct; my $qa= \%ARGS; @@ -86,6 +88,10 @@ Enter route (islands, or archipelagoes, separated by |s or commas; size=80 + + +
+ Vessel capacity: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', thingstring => 'capacitystring', emsgstore => \$emsg, @@ -95,6 +101,21 @@ Vessel capacity: &> + +  +  + + +Estimated loss per league: + +<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll', + thingstring => 'lossperleague', emsgstore => \$emsg, + perresult => sub { ($lossperleaguepct)= @_; } + &> + + +
+ % } else { #---------- dropdowns, user selects from menus ---------- % $startform->(grep { @@ -193,7 +214,7 @@ function ms_Setarch(dd) { % my $ours= sub { $_[0] =~ -% m/^island|^archipelago|^routestring|^capacitystring|^[RT]/; +% m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^[RT]/; % }; <& "lookup:formhidden", ours => $ours &> @@ -240,7 +261,8 @@ for my $dd (0..$qa->{Dropdowns}-1) { archipelagoes => \@archipelagoes, qa => $qa, max_mass => $max_mass, - max_volume => $max_volume + max_volume => $max_volume, + lossperleaguepct => $lossperleaguepct &> % }