X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_commod;h=9cb14ca6870e70abf887b518f2e9698313d67158;hb=98610392fde2add293bee6199f2de1d6f88559d8;hp=5a7497bac9d3d8d042bf40c031d565bf952607d2;hpb=b6d8c4a781c0bedf79a4b13af5afe9ad47de97ed;p=ypp-sc-tools.web-live.git diff --git a/yarrg/web/query_commod b/yarrg/web/query_commod index 5a7497b..9cb14ca 100644 --- a/yarrg/web/query_commod +++ b/yarrg/web/query_commod @@ -35,22 +35,52 @@ <%args> $quri +$dbh $commodstring => ''; +$someresults +$emsgokorprint -% my $qa= \%ARGS; +<%perl> +my $emsg; +my ($commodname,$commodid); + +my $qa= \%ARGS; + + +

Select commodity

%#---------- textbox, user enters route as string ---------- % if (!$qa->{Dropdowns}) { -

Select commodity

+Enter commodity (abbreviations are OK):
-<&| qtextstring, qa => $qa, thingstring => 'commodstring' &> +<&| qtextstring, qa => $qa, dbh => $dbh, + thingstring => 'commodstring', emsgstore => \$emsg, + perresult => sub { ($commodname,$commodid)= @_; } + &> size=80 % } else { #---------- dropdowns, user selects from menus ---------- +Not yet implemented. + % } #---------- end of dropdowns, now common middle of page code ---------- + + +% my $ours= sub { $_[0] =~ m/^commodstring|^commodid/; }; +<& "lookup:formhidden", ours => $ours &> + +
+ +%#========== results ========== +% $emsgokorprint->($emsg) or $commodid=undef; + +% if (defined $commodid) { +% $someresults->(); +COMMODITY <% $commodid %> named <% $commodname |h %> + +% }