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

(-)a/authorities/authorities.pl (-2 / +4 lines)
Lines 73-79 sub build_authorized_values_list { Link Here
73
73
74
74
75
    #---- branch
75
    #---- branch
76
    if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
76
    my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
77
    if ( $category eq "branches" ) {
77
        my $sth =
78
        my $sth =
78
        $dbh->prepare(
79
        $dbh->prepare(
79
            "select branchcode,branchname from branches order by branchname");
80
            "select branchcode,branchname from branches order by branchname");
Lines 86-92 sub build_authorized_values_list { Link Here
86
            $authorised_lib{$branchcode} = $branchname;
87
            $authorised_lib{$branchcode} = $branchname;
87
        }
88
        }
88
    }
89
    }
89
    elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
90
    elsif ( $category eq "itemtypes" ) {
90
        push @authorised_values, ""
91
        push @authorised_values, ""
91
          unless ( $tagslib->{$tag}->{$subfield}->{mandatory}
92
          unless ( $tagslib->{$tag}->{$subfield}->{mandatory}
92
            && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) );
93
            && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) );
Lines 121-126 sub build_authorized_values_list { Link Here
121
        values   => \@authorised_values,
122
        values   => \@authorised_values,
122
        labels   => \%authorised_lib,
123
        labels   => \%authorised_lib,
123
        default  => $value,
124
        default  => $value,
125
        ( ( grep { $_ eq $category } ( qw(branches itemtypes cn_source) ) ) ? () : ( category => $category ) ),
124
    };
126
    };
125
}
127
}
126
128
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-8 / +7 lines)
Lines 5-10 Link Here
5
<title>Koha &rsaquo; Authorities &rsaquo; [% IF ( authid ) %]Modify authority #[% authid | html %] ([% authtypetext | html %])[% ELSE %]Adding authority ([% authtypetext | html %])[% END %]</title>
5
<title>Koha &rsaquo; Authorities &rsaquo; [% IF ( authid ) %]Modify authority #[% authid | html %] ([% authtypetext | html %])[% ELSE %]Adding authority ([% authtypetext | html %])[% END %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
7
[% Asset.js("lib/hc-sticky.js") | $raw %]
8
9
<script>
10
    var CAN_user_parameters_manage_auth_values = "[% CAN_user_parameters_manage_auth_values | html %]";
11
</script>
8
[% Asset.js("js/cataloging.js") | $raw %]
12
[% Asset.js("js/cataloging.js") | $raw %]
9
13
10
<script>
14
<script>
Lines 168-179 function confirmnotdup(redirect){ Link Here
168
[% Asset.css("css/addbiblio.css") | $raw %]
172
[% Asset.css("css/addbiblio.css") | $raw %]
169
173
170
[% INCLUDE 'select2.inc' %]
174
[% INCLUDE 'select2.inc' %]
171
<script>
172
  $(document).ready(function() {
173
    $('.subfield_line select').select2();
174
  });
175
</script>
176
177
</head>
175
</head>
178
<body id="auth_authorities" class="auth">
176
<body id="auth_authorities" class="auth">
179
177
Lines 375-381 function confirmnotdup(redirect){ Link Here
375
                
373
                
376
                [% SET mv = subfield_loo.marc_value %]
374
                [% SET mv = subfield_loo.marc_value %]
377
                [% IF ( mv.type == 'select' ) %]
375
                [% IF ( mv.type == 'select' ) %]
378
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
376
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]" data-category="[% mv.category | html %]">
379
                     [% FOREACH aval IN mv.values %]
377
                     [% FOREACH aval IN mv.values %]
380
                         [% IF aval == mv.default %]
378
                         [% IF aval == mv.default %]
381
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
379
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
Lines 450-455 function confirmnotdup(redirect){ Link Here
450
448
451
</form>
449
</form>
452
450
451
[% INCLUDE 'modals/cataloguing_create_av.inc' %]
452
453
</div>
453
</div>
454
</div>
454
</div>
455
</div>
455
</div>
456
- 

Return to bug 25728