Lines 341-354
sub create_input {
Link Here
|
341 |
if(exists $mandatory_z3950->{$tag.$subfield}){ |
341 |
if(exists $mandatory_z3950->{$tag.$subfield}){ |
342 |
$subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield}; |
342 |
$subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield}; |
343 |
} |
343 |
} |
344 |
# decide if the subfield must be expanded (visible) by default or not |
344 |
# Subfield is hidden depending of hidden and mandatory flag, and is always |
345 |
# if it is mandatory, then expand. If it is hidden explicitly by the hidden flag, hidden anyway |
345 |
# shown if it contains anything or if its field is mandatory. |
|
|
346 |
my $tdef = $tagslib->{$tag}; |
346 |
$subfield_data{visibility} = "display:none;" |
347 |
$subfield_data{visibility} = "display:none;" |
347 |
if ( ($tagslib->{$tag}->{$subfield}->{hidden} % 2 == 1) and $value ne '' |
348 |
if $tdef->{$subfield}->{hidden} % 2 == 1 && |
348 |
or ($value eq '' and !$tagslib->{$tag}->{$subfield}->{mandatory}) |
349 |
$value eq '' && |
349 |
); |
350 |
!$tdef->{$subfield}->{mandatory} && |
350 |
# always expand all subfields of a mandatory field |
351 |
!$tdef->{mandatory}; |
351 |
$subfield_data{visibility} = "" if $tagslib->{$tag}->{mandatory}; |
|
|
352 |
# it's an authorised field |
352 |
# it's an authorised field |
353 |
if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { |
353 |
if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { |
354 |
$subfield_data{marc_value} = |
354 |
$subfield_data{marc_value} = |
355 |
- |
|
|