Bug 20063: (bug 18811 follow-up) Allow hidden $9 subfields
Although we could argue that the user should make all $9 subfields
visible, this might be a good compromise. It selectively reverts the
change from the first patch by accepting $9 subfields without checking
the hidden flag in the framework.
Test plan:
[1] Make a subfield $9 visible for some authority field.
[2] Put a value in it somewhere in authorities.pl
[3] Make subfield $9 invisible in the auth framework.
[4] Open and save the adjusted authority record.
[5] Check the marcxml of this record.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9c3eb146fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
8af1f9eb60
commit
15d4f717ed
|
|
@ -404,7 +404,7 @@ sub build_tabs {
|
|||
$subfield = '@';
|
||||
}
|
||||
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden};
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden} && $subfield ne '9';
|
||||
push(
|
||||
@subfields_data,
|
||||
&create_input(
|
||||
|
|
@ -420,7 +420,7 @@ sub build_tabs {
|
|||
my $value = $subfields[$subfieldcount][1];
|
||||
next if ( length $subfield != 1 );
|
||||
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden};
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden} && $subfield ne '9';
|
||||
push(
|
||||
@subfields_data,
|
||||
&create_input(
|
||||
|
|
@ -437,7 +437,7 @@ sub build_tabs {
|
|||
next if ( length $subfield != 1 );
|
||||
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
|
||||
next if ( $tag < 10 );
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden};
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden} && $subfield ne '9';
|
||||
next if ( defined( $field->subfield($subfield) ) );
|
||||
push(
|
||||
@subfields_data,
|
||||
|
|
@ -476,7 +476,7 @@ sub build_tabs {
|
|||
my @subfields_data;
|
||||
foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) {
|
||||
next if ( length $subfield != 1 );
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden};
|
||||
next if $tagslib->{$tag}->{$subfield}->{hidden} && $subfield ne '9';
|
||||
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
|
||||
push(
|
||||
@subfields_data,
|
||||
|
|
|
|||
Loading…
Reference in New Issue