chiark / gitweb /
Break advanced route options out into new component
[ypp-sc-tools.main.git] / yarrg / web / query_route
index 62c2aab9ee55c664f0c19f4bf992cafcc009e552..53167aca883f43943d06b3acdd543dabe3ad7ac7 100644 (file)
@@ -90,50 +90,13 @@ 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
-</&>
-
-</table>
+<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &>
 
 % } #---------- end of dropdowns, now common middle of page code ----------
 
@@ -162,10 +125,7 @@ foreach my $warningf (@warningfs) {
    islandids => \@islandids,
    archipelagoes => \@archipelagoes,
    qa => $qa,
-   max_mass => $max_mass,
-   max_volume => $max_volume,
-   lossperleaguepct => $lossperleaguepct,
-   max_capital => $capital
+   routeparams => $routeparams
  &>
 % }
 </form>