X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_route;h=fbdf2dc67d89670a48739d968b54b5ccd4c0bf1e;hb=18bff492748999fe28f474cea854f0fd26d6394f;hp=c21d967de469d24d8b32b2aa4363d66fb2824e5b;hpb=872e647cac241531e4599c8b8b330d8772020253;p=ypp-sc-tools.db-live.git
diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route
index c21d967..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, emsgstore => $emsg_r,
- thingstring => 'routestring', prefix => 'rl',
+ 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;
}
}
&>