3 # written 10/5/2002 by Paul
5 # Copyright 2000-2002 Katipo Communications
7 # This file is part of Koha.
9 # Koha is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # Koha is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with Koha; if not, see <http://www.gnu.org/licenses>.
31 sub plugin_javascript
{
32 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33 my $function_name= $field_number;
36 function Clic$function_name(subfield_managed) {
37 defaultvalue=document.getElementById(\"$field_number\").value;
38 newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_700-4.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=500,height=400,toolbar=false,scrollbars=yes');
44 return ($function_name,$res);
49 my $index= $input->param('index');
50 my $index2= $input->param('index2');
51 $index2=-1 unless($index2);
52 my $result= $input->param('result');
55 my $dbh = C4
::Context
->dbh;
57 my ($template, $loggedinuser, $cookie) = get_template_and_user
(
59 template_name
=> "cataloguing/value_builder/unimarc_field_700-4.tt",
63 flagsrequired
=> { editcatalogue
=> '*' },
67 $template->param(index => $index,
69 "f1_$result" => "f1_".$result,
71 output_html_with_http_headers
$input, $cookie, $template->output;