X-Git-Url: http://git.rot13.org/?p=webpac2;a=blobdiff_plain;f=vhost%2Fwebpac2.cgi;h=2abdb4c0f21aa1d51bf069082bf1898bd69e6363;hp=d68d2416db7791f665ed87ca5aea562846bccc16;hb=993fbf73916a251ce6007b3a66a2ffb9898e2de2;hpb=6dc31afb528f0974585b43793667186c5535d70f diff --git a/vhost/webpac2.cgi b/vhost/webpac2.cgi index d68d241..2abdb4c 100755 --- a/vhost/webpac2.cgi +++ b/vhost/webpac2.cgi @@ -12,6 +12,7 @@ use Data::Dump qw/dump/; use SWISH::API; use JSON; use Text::Unaccent::PurePerl qw/unac_string/; +use HTML::FillInForm::Lite; my $range_around = 5; my @entries_per_page = ( 30, 50, 100, 500 ); @@ -152,6 +153,15 @@ push @style, "../../$path/$path.css" if -e "$dir/$path/$path.css"; dump_yaml( 'style', \@style ); sub search_form { + + my $form_html = "$dir/$path/$path-search.html"; + if ( -e $form_html ) { + my $html = read_file( $form_html ); + my $q = CGI->new(); + my $h = HTML::FillInForm::Lite->new(); + return $h->fill(\$html, $q); + } + qq||, start_form( -action => self_url( query => 0 ) ), checkbox_group(