Lines 19-24
Link Here
|
19 |
# Suite 330, Boston, MA 02111-1307 USA |
19 |
# Suite 330, Boston, MA 02111-1307 USA |
20 |
|
20 |
|
21 |
use strict; |
21 |
use strict; |
|
|
22 |
use warnings; |
22 |
use CGI; |
23 |
use CGI; |
23 |
use C4::Auth; |
24 |
use C4::Auth; |
24 |
use C4::Output; |
25 |
use C4::Output; |
Lines 131-136
sub create_input {
Link Here
|
131 |
# if there is no value provided but a default value in parameters, get it |
132 |
# if there is no value provided but a default value in parameters, get it |
132 |
unless ($value) { |
133 |
unless ($value) { |
133 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; |
134 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; |
|
|
135 |
if (!defined $value) { |
136 |
$value = q{}; |
137 |
} |
134 |
|
138 |
|
135 |
# get today date & replace YYYY, MM, DD if provided in the default value |
139 |
# get today date & replace YYYY, MM, DD if provided in the default value |
136 |
my ( $year, $month, $day ) = Today(); |
140 |
my ( $year, $month, $day ) = Today(); |
Lines 352-358
sub build_tabs ($$$$$) {
Link Here
|
352 |
|
356 |
|
353 |
# if MARC::Record is not empty =>use it as master loop, then add missing subfields that should be in the tab. |
357 |
# if MARC::Record is not empty =>use it as master loop, then add missing subfields that should be in the tab. |
354 |
# if MARC::Record is empty => use tab as master loop. |
358 |
# if MARC::Record is empty => use tab as master loop. |
355 |
if ( $record ne -1 && ( $record->field($tag) || $tag eq '000' ) ) { |
359 |
if ( $record != -1 && ( $record->field($tag) || $tag eq '000' ) ) { |
356 |
my @fields; |
360 |
my @fields; |
357 |
if ( $tag ne '000' ) { |
361 |
if ( $tag ne '000' ) { |
358 |
@fields = $record->field($tag); |
362 |
@fields = $record->field($tag); |
Lines 553-559
if ($authid) {
Link Here
|
553 |
($oldauthnumtagfield,$oldauthnumtagsubfield) = &GetAuthMARCFromKohaField("auth_header.authid",$authtypecode); |
557 |
($oldauthnumtagfield,$oldauthnumtagsubfield) = &GetAuthMARCFromKohaField("auth_header.authid",$authtypecode); |
554 |
($oldauthtypetagfield,$oldauthtypetagsubfield) = &GetAuthMARCFromKohaField("auth_header.authtypecode",$authtypecode); |
558 |
($oldauthtypetagfield,$oldauthtypetagsubfield) = &GetAuthMARCFromKohaField("auth_header.authtypecode",$authtypecode); |
555 |
} |
559 |
} |
556 |
|
560 |
$op ||= q{}; |
557 |
#------------------------------------------------------------------------------------------------------------------------------ |
561 |
#------------------------------------------------------------------------------------------------------------------------------ |
558 |
if ($op eq "add") { |
562 |
if ($op eq "add") { |
559 |
#------------------------------------------------------------------------------------------------------------------------------ |
563 |
#------------------------------------------------------------------------------------------------------------------------------ |
Lines 578-584
if ($op eq "add") {
Link Here
|
578 |
} |
582 |
} |
579 |
} |
583 |
} |
580 |
|
584 |
|
581 |
my ($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "add") && (!$is_a_modif); |
585 |
my ($duplicateauthid,$duplicateauthvalue); |
|
|
586 |
($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "add") && (!$is_a_modif); |
582 |
my $confirm_not_duplicate = $input->param('confirm_not_duplicate'); |
587 |
my $confirm_not_duplicate = $input->param('confirm_not_duplicate'); |
583 |
# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) |
588 |
# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) |
584 |
if (!$duplicateauthid or $confirm_not_duplicate) { |
589 |
if (!$duplicateauthid or $confirm_not_duplicate) { |
Lines 627-635
$template->param(authid => $authid,
Link Here
|
627 |
my $authtypes = getauthtypes; |
632 |
my $authtypes = getauthtypes; |
628 |
my @authtypesloop; |
633 |
my @authtypesloop; |
629 |
foreach my $thisauthtype (keys %$authtypes) { |
634 |
foreach my $thisauthtype (keys %$authtypes) { |
630 |
my $selected = 1 if $thisauthtype eq $authtypecode; |
|
|
631 |
my %row =(value => $thisauthtype, |
635 |
my %row =(value => $thisauthtype, |
632 |
selected => $selected, |
636 |
selected => $thisauthtype eq $authtypecode, |
633 |
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, |
637 |
authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, |
634 |
); |
638 |
); |
635 |
push @authtypesloop, \%row; |
639 |
push @authtypesloop, \%row; |