</%doc>
<%args>
$quri
-$qa
$routestring => '';
</%args>
<%perl>
my @islandids;
my %islandid2;
+my $qa= \%ARGS;
</%perl>
%#---------- textbox, user enters route as string ----------
<h1>Specify route</h1>
+Enter route (islands, or archipelagoes, separated by |s or commas;
+ abbreviations are OK):<br>
+
<form action="<% $quri->() |h %>" method="get">
<&| qtextstring, qa => $qa, thingstring => 'routestring' &>
$optionlistmap->($islandlistdata{$arch}, '');
}
-</%perl>
+$dbh->rollback();
-<input type=hidden name=dropdowns value="<% $qa->{Dropdowns} |h %>">
+</%perl>
<&| script &>
ms_lists= <% to_json_protecttags(\%resetislandlistdata) %>;
% } #---------- end of dropdowns, now common middle of page code ----------
<input type=submit name=submit value="Go">
+% my $ours= sub { $_[0] =~ m/^island|^archipelago|^routestring/; };
+<& "lookup:formhidden", ours => $ours &>
</form>
<%perl>
if (!$qa->{Dropdowns}) {
if (length $routestring) {
$results_head->();
- my $rsr= $m->comp('routetextstring',
+ my ($emsg,$canonstring,$results)= $m->comp('qtextstringcheck',
+ what => 'routestring',
ocean => $qa->{Ocean},
string => $routestring,
format => 'return'
);
- if (length $rsr->{Error}) {
- print encode_entities($rsr->{Error});
+ if (length $emsg) {
+ print encode_entities($emsg);
} else {
- foreach my $entry (@{ $rsr->{Results} }) {
- push @archipelagoes,
- defined $entry->[1] ? undef : $entry->[0];
+ foreach my $entry (@$results) {
push @islandids, $entry->[1];
+ push @archipelagoes,
+ defined $entry->[1] ? undef : $entry->[2];
}
}
}