|
Lines 37-42
use Koha::DateUtils qw( dt_from_string );
Link Here
|
| 37 |
|
37 |
|
| 38 |
my $input = new CGI; |
38 |
my $input = new CGI; |
| 39 |
my $op = $input->param('op'); |
39 |
my $op = $input->param('op'); |
|
|
40 |
my $biblionumber = $input->param('biblionumber'); |
| 40 |
my $suggestion = $input->Vars; |
41 |
my $suggestion = $input->Vars; |
| 41 |
my $negcaptcha = $input->param('negcap'); |
42 |
my $negcaptcha = $input->param('negcap'); |
| 42 |
my $suggested_by_anyone = $input->param('suggested_by_anyone') || 0; |
43 |
my $suggested_by_anyone = $input->param('suggested_by_anyone') || 0; |
|
Lines 116-122
if ( $op eq 'else' ) {
Link Here
|
| 116 |
} |
117 |
} |
| 117 |
} |
118 |
} |
| 118 |
|
119 |
|
| 119 |
if ( $op eq "add_validate" ) { |
120 |
if ( $op eq "add_validate" && not $biblionumber ) { # If we are creating the suggestion from an existing record we do not want to search for duplicates |
| 120 |
$op = 'add_confirm'; |
121 |
$op = 'add_confirm'; |
| 121 |
my $biblio = MarcRecordFromNewSuggestion($suggestion); |
122 |
my $biblio = MarcRecordFromNewSuggestion($suggestion); |
| 122 |
if ( my ($duplicatebiblionumber, $duplicatetitle) = FindDuplicate($biblio) ) { |
123 |
if ( my ($duplicatebiblionumber, $duplicatetitle) = FindDuplicate($biblio) ) { |
|
Lines 229-234
my @mandatoryfields;
Link Here
|
| 229 |
foreach (@mandatoryfields) { |
230 |
foreach (@mandatoryfields) { |
| 230 |
$template->param( $_."_required" => 1); |
231 |
$template->param( $_."_required" => 1); |
| 231 |
} |
232 |
} |
|
|
233 |
if ( $biblionumber ) { |
| 234 |
my $biblio = Koha::Biblios->find($biblionumber); |
| 235 |
$template->param( |
| 236 |
biblionumber => $biblio->biblionumber, |
| 237 |
title => $biblio->title, |
| 238 |
author => $biblio->author, |
| 239 |
copyrightdate => $biblio->copyrightdate, |
| 240 |
isbn => $biblio->biblioitem->isbn, |
| 241 |
publishercode => $biblio->biblioitem->publishercode, |
| 242 |
collectiontitle => $biblio->biblioitem->collectiontitle, |
| 243 |
place => $biblio->biblioitem->place, |
| 244 |
); |
| 245 |
} |
| 232 |
} |
246 |
} |
| 233 |
|
247 |
|
| 234 |
$template->param( |
248 |
$template->param( |
| 235 |
- |
|
|