View | Details | Raw Unified | Return to bug 32748
Collapse All | Expand All

(-)a/Koha/UI/Form/Builder/Item.pm (-2 / +11 lines)
Lines 252-261 sub generate_subfield_form { Link Here
252
        else {
252
        else {
253
            push @authorised_values, qq{};
253
            push @authorised_values, qq{};
254
            my $av = GetAuthorisedValues( $subfield->{authorised_value} );
254
            my $av = GetAuthorisedValues( $subfield->{authorised_value} );
255
            my $current_value_av = Koha::AuthorisedValues->search({ authorised_value => $value })->next;
256
255
            for my $r (@$av) {
257
            for my $r (@$av) {
256
                push @authorised_values, $r->{authorised_value};
258
                push @authorised_values, $r->{authorised_value};
257
                $authorised_lib{ $r->{authorised_value} } = $r->{lib};
259
                $authorised_lib{ $r->{authorised_value} } = $r->{lib};
258
            }
260
            }
261
            if ( defined $current_value_av ) {
262
                my $current_av_code = $current_value_av->authorised_value;
263
                my $current_av_lib  = $current_value_av->lib;
264
                if ( !grep { $_ eq $current_av_code } @authorised_values ) {
265
                    push @authorised_values, $current_av_code;
266
                    $authorised_lib{$current_av_code} = $current_av_lib;
267
                }
268
            }
259
        }
269
        }
260
270
261
        if ( $subfield->{hidden} > 4 or $subfield->{hidden} <= -4 ) {
271
        if ( $subfield->{hidden} > 4 or $subfield->{hidden} <= -4 ) {
Lines 572-578 sub edit_form { Link Here
572
                        prefill_with_default_values => $prefill_with_default_values,
582
                        prefill_with_default_values => $prefill_with_default_values,
573
                        branch_limit       => $branch_limit,
583
                        branch_limit       => $branch_limit,
574
                        default_branches_empty => $default_branches_empty,
584
                        default_branches_empty => $default_branches_empty,
575
                        readonly           => $readonly
585
                        readonly           => $readonly,
576
                    }
586
                    }
577
                );
587
                );
578
                push @subfields, $subfield_data;
588
                push @subfields, $subfield_data;
579
- 

Return to bug 32748