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=6d2c9fdca32b0a9ca982fb7ea6eeb577e087d414;hp=c21d967de469d24d8b32b2aa4363d66fb2824e5b;hb=6c9a152ce924835192b2877fbba36071b5e69032;hpb=db998ff5d636967de9de9218ff0b940a4feb9a6d diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route index c21d967..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, emsgstore => $emsg_r, - thingstring => 'routestring', prefix => 'rl', +<& 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 ----------