# Suite 330, Boston, MA 02111-1307 USA
use strict;
-require Exporter;
+
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Auth;
use C4::Output;
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
my $function_name= "328".(int(rand(100000))+1);
my $res="
-<script>
-function Focus$function_name(subfield_managed) {
-return 1;
-}
-
-function Blur$function_name(subfield_managed) {
- return 1;
-}
-
+<script type=\"text/javascript\">
+//<![CDATA[
+function Focus$function_name(subfield_managed) {return 1;}
+function Blur$function_name(subfield_managed) {return 1;}
function Clic$function_name(i) {
- defaultvalue=document.f.field_value[i].value;
- newin=window.open(\"plugin_launcher.pl?plugin_name=labs_theses.pl&cat_auth=LABTHE&index=\"+i+\"&result=\"+defaultvalue,\"unimarc field 328\",'width=700,height=700,toolbar=false,scrollbars=yes');
-
+ defaultvalue=document.getElementById(i).value;
+ newin=window.open(\"plugin_launcher.pl?plugin_name=labs_theses.pl&cat_auth=LABTHE&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_328\",'width=700,height=700,toolbar=false,scrollbars=yes');
+ return false;
}
+//]]>
</script>
";
sub plugin {
my ($input) = @_;
- my %env;
-
-
my $dbh=C4::Context->dbh;
my $query = new CGI;
my $op = $query->param('op');
my $total;
while (my $data = $sth->fetchrow_hashref){
my $libjs=$data->{'lib'};
- $libjs=~s#\'#\\\'#g;
+# $libjs=~s#\'#\\\'#g;
my $authjs=$data->{'authorised_value'};
- $authjs=~s#\'#\\\'#g;
+# $authjs=~s#\'#\\\'#g;
push @results, {'libjs'=>$libjs,
'lib'=>$data->{'lib'},
'authjs'=>$authjs,
}
($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "value_builder/labs_theses.tmpl",
+ = get_template_and_user({template_name => "cataloguing/value_builder/labs_theses.tmpl",
query => $query,
type => 'intranet',
authnotrequired => 1,
} else {
($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "value_builder/labs_theses.tmpl",
+ = get_template_and_user({template_name => "cataloguing/value_builder/labs_theses.tmpl",
query => $query,
type => "intranet",
authnotrequired => 1,