3 # written 10/5/2002 by Paul
4 # build Subject field using bibliothesaurus table
10 use C4::Circulation::Circ2;
13 # get all the data ....
17 my $subject = $input->param('subject');
18 my $search_string= $input->param('search_string');
19 my $op = $input->param('op');
20 my $freelib_text = $input->param('freelib_text');
26 if ($op eq "select") {
27 $subject = $subject."|$freelib_text";
32 <title>Subject builder</title>
35 <form name="f_pop" action="thesaurus_popup.pl" method="post">
36 <textarea name="subject" rows=10 cols=60>$subject </textarea></br>
37 <p><input type="text" name="search_string" value="$search_string">
38 <input type="hidden" name="op" value="search">
39 <input type="submit" value="Search"></p>
42 # /search thesaurus terms starting by search_string
44 print '<form name="f2_pop" action="thesaurus_popup.pl" method="post">';
45 print '<select name="freelib_text">';
46 my $sti=$dbh->prepare("select freelib,stdlib from bibliothesaurus where freelib like '".$search_string."%'");
48 while (my $line=$sti->fetchrow_hashref) {
49 print "<option value='$line->{'stdlib'}'>$line->{freelib}</option>";
53 <input type="hidden" name="op" value="select">
54 <input type="hidden" name="subject" value="$subject">
55 <input type="submit" name="OK" value="OK">
60 <form name="f3_pop" onSubmit="javascript:report()">
61 <input type="submit" value="END">
66 opener.document.f.subject.value= document.f_pop.subject.value;