X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_route;h=fbdf2dc67d89670a48739d968b54b5ccd4c0bf1e;hp=58b29f4f13387c4916cd8348e8d49e2eeddccb24;hb=5df1a21a8f7ad18ade3a97b9ccf26bdcf335edd2;hpb=13b9f206d92634f4e6f4a940ed31690c1235d827 diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route index 58b29f4..fbdf2dc 100644 --- a/yarrg/web/enter_route +++ b/yarrg/web/enter_route @@ -48,16 +48,23 @@ $archipelagoes_r %#---------- textbox, user enters route as string ---------- % if (!$qa->{Dropdowns}) { -<% $enterwhat %> (islands, or archipelagoes, separated by |s or commas; - abbreviations are OK):
+<% $enterwhat %> +% if (defined($archipelagoes_r)) { +(islands, or archipelagoes, +% } else { +(islands +% } +separated by |s or commas; abbreviations are OK):
-<&| qtextstring, qa => $qa, dbh => $dbh, - thingstring => 'routestring', emsgstore => $emsg_r, +<&| qtextstring, qa => $qa, dbh => $dbh, emsgstore => $emsg_r, + thingstring => defined($archipelagoes_r) ? 'routestring' : 'islandstring', + prefix => 'rl', onresults => sub { foreach (@_) { my ($canonname, $island, $arch) = @$_; push @$islandids_r, $island; - push @$archipelagoes_r, defined $island ? undef : $arch; + push @$archipelagoes_r, defined $island ? undef : $arch + if defined $archipelagoes_r; } } &> @@ -186,5 +193,6 @@ for my $dd (0..$qa->{Dropdowns}-1) { } +

% }