X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_route;h=6d2c9fdca32b0a9ca982fb7ea6eeb577e087d414;hb=f8abaac789a49c036e513127ac2051c3c9fe0f5e;hp=f4ad1d7ed003283e80aabc2babeda6d4f8414800;hpb=c8de43092657e7b16e83e2db0357a8048a0d0f9e;p=ypp-sc-tools.db-live.git
diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route
index f4ad1d7..6d2c9fd 100644
--- a/yarrg/web/enter_route
+++ b/yarrg/web/enter_route
@@ -48,21 +48,26 @@ $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', boxopts => 'size=80',
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;
}
}
&>
- size=80
-&>
% } else { #---------- dropdowns, user selects from menus ----------