|
Lines 452-458
Limit info depending on the library (so far only item types).
Link Here
|
| 452 |
|
452 |
|
| 453 |
Flag to add an empty option to the library list. |
453 |
Flag to add an empty option to the library list. |
| 454 |
|
454 |
|
| 455 |
=item ignore_invisible_subfields |
455 |
=item ignore_non_mandatory_invisible_subfields |
| 456 |
|
456 |
|
| 457 |
Skip the subfields that are not visible on the editor. |
457 |
Skip the subfields that are not visible on the editor. |
| 458 |
|
458 |
|
|
Lines 465-480
When duplicating an item we do not want to retrieve the subfields that are hidde
Link Here
|
| 465 |
sub edit_form { |
465 |
sub edit_form { |
| 466 |
my ( $self, $params ) = @_; |
466 |
my ( $self, $params ) = @_; |
| 467 |
|
467 |
|
| 468 |
my $branchcode = $params->{branchcode}; |
468 |
my $branchcode = $params->{branchcode}; |
| 469 |
my $restricted_edition = $params->{restricted_editition}; |
469 |
my $restricted_edition = $params->{restricted_editition}; |
| 470 |
my $subfields_to_prefill = $params->{subfields_to_prefill} || []; |
470 |
my $subfields_to_prefill = $params->{subfields_to_prefill} || []; |
| 471 |
my $subfields_to_allow = $params->{subfields_to_allow} || []; |
471 |
my $subfields_to_allow = $params->{subfields_to_allow} || []; |
| 472 |
my $ignore_not_allowed_subfields = $params->{ignore_not_allowed_subfields}; |
472 |
my $ignore_not_allowed_subfields = $params->{ignore_not_allowed_subfields}; |
| 473 |
my $kohafields_to_ignore = $params->{kohafields_to_ignore} || []; |
473 |
my $kohafields_to_ignore = $params->{kohafields_to_ignore} || []; |
| 474 |
my $prefill_with_default_values = $params->{prefill_with_default_values}; |
474 |
my $prefill_with_default_values = $params->{prefill_with_default_values}; |
| 475 |
my $branch_limit = $params->{branch_limit}; |
475 |
my $branch_limit = $params->{branch_limit}; |
| 476 |
my $default_branches_empty = $params->{default_branches_empty}; |
476 |
my $default_branches_empty = $params->{default_branches_empty}; |
| 477 |
my $ignore_invisible_subfields = $params->{ignore_invisible_subfields} || 0; |
477 |
my $ignore_non_mandatory_invisible_subfields = $params->{ignore_invisible_subfields} || 0; |
| 478 |
|
478 |
|
| 479 |
my $libraries = |
479 |
my $libraries = |
| 480 |
Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed; |
480 |
Koha::Libraries->search( {}, { order_by => ['branchname'] } )->unblessed; |
|
Lines 508-515
sub edit_form {
Link Here
|
| 508 |
if grep { $subfield->{kohafield} && $subfield->{kohafield} eq $_ } @$kohafields_to_ignore; |
508 |
if grep { $subfield->{kohafield} && $subfield->{kohafield} eq $_ } @$kohafields_to_ignore; |
| 509 |
|
509 |
|
| 510 |
next |
510 |
next |
| 511 |
if $ignore_invisible_subfields |
511 |
if $ignore_non_mandatory_invisible_subfields |
| 512 |
&& ( $subfield->{hidden} > 4 || $subfield->{hidden} <= -4 ); |
512 |
&& ( $subfield->{hidden} > 4 || $subfield->{hidden} <= -4 ) |
|
|
513 |
&& !$subfield->{mandatory}; |
| 513 |
|
514 |
|
| 514 |
my $readonly; |
515 |
my $readonly; |
| 515 |
if ( @$subfields_to_allow |
516 |
if ( @$subfields_to_allow |