4 # This file is part of Koha.
6 # Koha is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # Koha is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Koha; if not, see <http://www.gnu.org/licenses>.
23 use Koha::Util::FrameworkPlugin qw(wrapper);
24 use C4::Auth qw( get_template_and_user );
27 use C4::Output qw( output_html_with_http_headers );
31 my $id = $params->{id};
36 function Click$id(event) {
37 var fieldvalue=\$('#'+event.data.id).val();
38 window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_182-2.pl&index=\"+event.data.id+\"&result=\"+fieldvalue,\"tag_editor\",'width=700,height=700,toolbar=false,scrollbars=yes');
39 return false; /* prevents scrolling */
46 my $cgi = $params->{cgi};
47 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
48 template_name => "cataloguing/value_builder/unimarc_field_182-2.tt",
51 flagsrequired => {editcatalogue => '*'},
54 index => scalar $cgi->param('index'),
55 result => scalar $cgi->param('result'),
57 output_html_with_http_headers $cgi, $cookie, $template->output;
60 return { builder => $builder, launcher => $launcher };