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=393e7a668755145d05262a56b56ed005330669c1;hp=adcb89deea5b2a7af860c79b5c9403756a811158;hb=59bee7afb77216585b904bd20f17e71005e9778c;hpb=3f99b04acd8cf6080069b542206f9f3de049f58a diff --git a/yarrg/web/query_route b/yarrg/web/query_route index adcb89d..393e7a6 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -49,6 +49,16 @@ my @islandids; my %islandid2; my $qa= \%ARGS; + +my $be_post; +my $startform= sub { + ($be_post)= @_; + +
+<%perl> +}; +my $goupdate= sub { $be_post ? 'Update' : 'Go' }; +

Specify route

@@ -61,7 +71,7 @@ my $qa= \%ARGS; Enter route (islands, or archipelagoes, separated by |s or commas; abbreviations are OK):
- +% $startform->($routestring =~ m/\S/); <&| qtextstring, qa => $qa, dbh => $dbh, thingstring => 'routestring', emsgstore => \$emsg, @@ -76,6 +86,11 @@ Enter route (islands, or archipelagoes, separated by |s or commas; % } else { #---------- dropdowns, user selects from menus ---------- +% $startform->(grep { +% defined $ARGS{"archipelago$_"} || +% defined $ARGS{"islandid$_"} +% } (0..$qa->{Dropdowns}-1)); + <%perl> my ($sth,$row); my @archlistdata; @@ -165,7 +180,7 @@ function ms_Setarch(dd) { % } #---------- end of dropdowns, now common middle of page code ---------- - + % my $ours= sub { $_[0] =~ m/^island|^archipelago|^routestring|^[RT]/; }; <& "lookup:formhidden", ours => $ours &> @@ -205,7 +220,7 @@ for my $dd (0..$qa->{Dropdowns}-1) { % if (@islandids) { -% $someresults->(); +% $someresults->('Relevant trades'); <& routetrade, dbh => $dbh, islandids => \@islandids,