chiark / gitweb /
Printable plan: Put generation date near the top with the input questions
[ypp-sc-tools.db-live.git] / yarrg / web / query_route
index 2162e8a8bbf203c7336c561d217374c378d11043..fb32bcdd705017d6ad82f7da4a3344c55b44b47e 100644 (file)
@@ -50,9 +50,6 @@ my $emsg;
 my @warningfs;
 my @archipelagoes;
 my @islandids;
-my ($max_volume, $max_mass);
-my $lossperleaguepct;
-my $capital;
 
 my $qa= \%ARGS;
 
@@ -90,53 +87,10 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' };
  &>
 
 %#---------- textboxes, user enters details as strings ----------
+% my $routeparams= { EmsgRef => \$emsg };
 % if (!$qa->{Dropdowns}) {
 
-<strong>Advanced options - you may leave these blank:</strong>
-<p>
-<table>
-<tr>
-<td>
-
-Vessel or capacity:
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs',
-    thingstring => 'capacitystring', emsgstore => \$emsg,
-    helpref => 'capacity',
-    onresults => sub { ($max_mass,$max_volume) = @_; }
- &>
- size=40
-</&>
-
-<td>
-&nbsp;
-&nbsp;
-
-<td>
-Expected losses:
-
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll',
-    thingstring => 'lossperleague', emsgstore => \$emsg,
-    helpref => 'losses',
-    onresults => sub { ($lossperleaguepct)= @_; }
- &>
- size=9
-</&>
-
-</table>
-<table><tr>
-
-<td>Available capital:
-
-<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac',
-    thingstring => 'capitalstring', emsgstore => \$emsg,
-    helpref => 'capital',
-    onresults => sub { ($capital)= @_; }
- &>
- size=9
-</&>
-</td>
-</tr>
-</table>
+<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &>
 
 % } #---------- end of dropdowns, now common middle of page code ----------
 
@@ -159,16 +113,13 @@ foreach my $warningf (@warningfs) {
 </%perl>
 
 % if (@islandids) {
-%      $someresults->('Relevant trades');
+%      $someresults->();
 <& routetrade,
    dbh => $dbh,
    islandids => \@islandids,
    archipelagoes => \@archipelagoes,
    qa => $qa,
-   max_mass => $max_mass,
-   max_volume => $max_volume,
-   lossperleaguepct => $lossperleaguepct,
-   max_capital => $capital
+   routeparams => $routeparams
  &>
 % }
 </form>