Lines 28-56
use C4::Search;
Link Here
|
28 |
use C4::Output qw( output_html_with_http_headers ); |
28 |
use C4::Output qw( output_html_with_http_headers ); |
29 |
|
29 |
|
30 |
use XML::LibXML; |
30 |
use XML::LibXML; |
31 |
use Koha::Util::FrameworkPlugin qw|date_entered|; |
31 |
use Koha::Util::FrameworkPlugin qw( biblio_008 ); |
32 |
|
32 |
|
33 |
my $builder = sub { |
33 |
my $builder = sub { |
34 |
my ( $params ) = @_; |
34 |
my ( $params ) = @_; |
35 |
|
35 |
|
36 |
my $lang = C4::Context->preference('DefaultLanguageField008' ); |
|
|
37 |
$lang = "eng" unless $lang; |
38 |
$lang = pack("A3", $lang); |
39 |
my $country = C4::Context->preference('DefaultCountryField008'); |
40 |
$country = "|||" unless $country; |
41 |
$country = pack("A3", $country); |
42 |
|
43 |
my $function_name = $params->{id}; |
36 |
my $function_name = $params->{id}; |
44 |
my $dateentered = date_entered(); |
37 |
my $default008 = biblio_008(); |
45 |
my $res = " |
38 |
my $res = " |
46 |
<script> |
39 |
<script> |
47 |
|
40 |
|
48 |
function Focus$function_name(event) { |
41 |
function Focus$function_name(event) { |
49 |
if ( document.getElementById(event.data.id).value ) { |
42 |
if( !document.getElementById(event.data.id).value ) { |
50 |
} |
43 |
document.getElementById(event.data.id).value='$default008'; |
51 |
else { |
44 |
} |
52 |
document.getElementById(event.data.id).value='$dateentered' + 'b $country||||| |||| 00| 0 $lang d'; |
|
|
53 |
} |
54 |
return 1; |
45 |
return 1; |
55 |
} |
46 |
} |
56 |
|
47 |
|
Lines 75-88
function Click$function_name(event) {
Link Here
|
75 |
my $launcher = sub { |
66 |
my $launcher = sub { |
76 |
my ( $params ) = @_; |
67 |
my ( $params ) = @_; |
77 |
my $input = $params->{cgi}; |
68 |
my $input = $params->{cgi}; |
78 |
my $lang = C4::Context->preference('DefaultLanguageField008' ); |
|
|
79 |
$lang = "eng" unless $lang; |
80 |
$lang = pack("A3", $lang); |
81 |
my $country = C4::Context->preference('DefaultCountryField008') // "xxu"; |
82 |
$country = pack("A3", $country); |
83 |
|
69 |
|
84 |
my $index = $input->param('index'); |
70 |
my $index = $input->param('index'); |
85 |
my $result = $input->param('result'); |
71 |
my $result = $input->param('result') || biblio_008(); |
86 |
my $leader = $input->param('leader'); |
72 |
my $leader = $input->param('leader'); |
87 |
|
73 |
|
88 |
my $material_configuration; |
74 |
my $material_configuration; |
Lines 142-149
my $launcher = sub {
Link Here
|
142 |
} |
128 |
} |
143 |
); |
129 |
); |
144 |
|
130 |
|
145 |
my $dateentered = date_entered(); |
|
|
146 |
$result = "$dateentered" . "b $country||||| |||| 00| 0 $lang d" unless $result; |
147 |
my $errorXml = ''; |
131 |
my $errorXml = ''; |
148 |
# Check if the xml, xsd exists and is validated |
132 |
# Check if the xml, xsd exists and is validated |
149 |
my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/'; |
133 |
my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/'; |
150 |
- |
|
|