Lines 202-208
if ($is_ajax) {
Link Here
|
202 |
my $i = 1; |
202 |
my $i = 1; |
203 |
foreach (@errors) { |
203 |
foreach (@errors) { |
204 |
my $key = ( keys %$_ )[0]; |
204 |
my $key = ( keys %$_ )[0]; |
205 |
$err_string .= "\n\t\t KOHA.Tags.tag_message.$key(\"" . $_->{$key} . '")'; |
205 |
( my $quote_escaped = $_->{$key} ) =~ s|"|\\"|g; |
|
|
206 |
$err_string .= sprintf qq{\n\t\t KOHA.Tags.tag_message.%s("%s")}, $key, $quote_escaped; |
206 |
if ( $i < scalar @errors ) { $err_string .= ","; } |
207 |
if ( $i < scalar @errors ) { $err_string .= ","; } |
207 |
$i++; |
208 |
$i++; |
208 |
} |
209 |
} |
Lines 219-225
if ($is_ajax) {
Link Here
|
219 |
foreach ( @{ $bibResult->{errors} } ) { |
220 |
foreach ( @{ $bibResult->{errors} } ) { |
220 |
$js_bibres .= "," if ($i); |
221 |
$js_bibres .= "," if ($i); |
221 |
my $key = ( keys %$_ )[0]; |
222 |
my $key = ( keys %$_ )[0]; |
222 |
$js_bibres .= "\n\t\t\t KOHA.Tags.tag_message.$key(\"" . $_->{$key} . '")'; |
223 |
( my $quote_escaped = $_->{$key} ) =~ s|"|\\"|g; |
|
|
224 |
$js_bibres .= sprintf qq{\n\t\t\t KOHA.Tags.tag_message.%s("%s")}, $key, $quote_escaped; |
223 |
$i++; |
225 |
$i++; |
224 |
} |
226 |
} |
225 |
$js_bibres .= "\n\t\t]\n\t}"; |
227 |
$js_bibres .= "\n\t\t]\n\t}"; |
Lines 382-385
response = {
Link Here
|
382 |
}; |
384 |
}; |
383 |
|
385 |
|
384 |
=cut |
386 |
=cut |
385 |
|
|
|
386 |
- |