foreach my $var (keys %ARGS) {
next unless $var =~
- m/^(?:(?:route|commod)string|islandid\d|archipelago\d|debug)$/;
+ m/^(?: (?:route|commod)string |
+ islandid \d |
+ archipelago \d |
+ debug |
+ rtsel[ag]_\w+
+ )$/x;
my $val= $ARGS{$var};
next if $val eq 'none';
$queryqf{$var}= $val;
% } #---------- end of dropdowns, now common middle of page code ----------
<input type=submit name=submit value="Go">
-% my $ours= sub { $_[0] =~ m/^island|^archipelago|^routestring/; };
+% my $ours= sub { $_[0] =~ m/^island|^archipelago|^routestring|^rtsel[ag]_/; };
<& "lookup:formhidden", ours => $ours &>
-</form>
<%perl>
#========== results ==========
archipelagoes => \@archipelagoes,
qa => $qa
&>
+</form>
% }
}
$f->{Uid}= join '_', @uid;
+ if ($qa->{"rtsela_$f->{Uid}"} &&
+ !$qa->{"rtselg_$f->{Uid}"}) {
+ $f->{Suppress}= 1;
+ }
+
push @flows, $f;
</%perl>
my %avail_csts;
foreach my $flow (@flows) {
+ if ($flow->{Suppress}) {
+ $cplex .= "
+ $flow->{Var} = 0
+";
+ next;
+ }
foreach my $od (qw(org dst)) {
my $cstname= join '_', (
'avail',
% my $cdstall= $qa->{ShowStalls} ? '<th>Stall</th>' : '';
<table>
<tr>
+<th>
<th<% $cdspan %>>Collect
<th<% $cdspan %>>Deliver
<th>
% }
<tr>
+<th>
<th>Island <% $cdstall %>
<th>Island <% $cdstall %>
<th>Commodity
% foreach my $flow (@flows) {
<tr>
+<td><input type=hidden name=rtsela_<% $flow->{Uid} %> value=1>
+ <input type=checkbox name=rtselg_<% $flow->{Uid} %> value=1
+ <% $flow->{Suppress} ? '' : 'checked' %> >
% foreach my $col (@columns) {
<td><% $flow->{$col} |h %>
% }
% }
</table>
+<input type=submit name=update value="Update">
+
<%init>
use CommodsWeb;
use Commods;