MT 2050, Follow-up, Fast Cataloging
[koha.git] / cataloguing / value_builder / marc21_leader_computerfile.pl
index 81df209..20e02bf 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -41,7 +40,9 @@ sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
 my $function_name= $field_number;
 my $res="
-<script>
+<script type=\"text/javascript\">
+//<![CDATA[
+
 function Focus$function_name(subfield_managed) {
 return 1;
 }
@@ -52,9 +53,10 @@ function Blur$function_name(subfield_managed) {
 
 function Clic$function_name(i) {
        defaultvalue=document.getElementById(\"$field_number\").value;
-       newin=window.open(\"plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
+       newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
 
 }
+//]]>
 </script>
 ";
 
@@ -69,11 +71,11 @@ my ($input) = @_;
        my $dbh = C4::Context->dbh;
 
 my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "value_builder/marc21_leader_computerfile.tmpl",
+    = get_template_and_user({template_name => "cataloguing/value_builder/marc21_leader_computerfile.tmpl",
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     nmm         7a      " unless $result;