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%2Fenter_route;h=fbdf2dc67d89670a48739d968b54b5ccd4c0bf1e;hp=f4ad1d7ed003283e80aabc2babeda6d4f8414800;hb=53dfe71f6c510ee12bbf6bdaeb3984024d34a7be;hpb=c8de43092657e7b16e83e2db0357a8048a0d0f9e diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route index f4ad1d7..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; } } &>