X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_route;h=6d2c9fdca32b0a9ca982fb7ea6eeb577e087d414;hb=27c23298aea5653ffba93b5a9c41bfa321b478d7;hp=58b29f4f13387c4916cd8348e8d49e2eeddccb24;hpb=13b9f206d92634f4e6f4a940ed31690c1235d827;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/enter_route b/yarrg/web/enter_route index 58b29f4..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 ---------- @@ -186,5 +191,6 @@ for my $dd (0..$qa->{Dropdowns}-1) { } +

% }