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 161-172 function confirmnotdup(redirect){ Link Here
161
[% Asset.css("css/addbiblio.css") | $raw %]
165
[% Asset.css("css/addbiblio.css") | $raw %]
162
166
163
[% INCLUDE 'select2.inc' %]
167
[% INCLUDE 'select2.inc' %]
164
<script>
165
  $(document).ready(function() {
166
    $('.subfield_line select').select2();
167
  });
168
</script>
169
170
</head>
168
</head>
171
<body id="auth_authorities" class="auth">
169
<body id="auth_authorities" class="auth">
172
170
Lines 368-374 function confirmnotdup(redirect){ Link Here
368
                
366
                
369
                [% SET mv = subfield_loo.marc_value %]
367
                [% SET mv = subfield_loo.marc_value %]
370
                [% IF ( mv.type == 'select' ) %]
368
                [% IF ( mv.type == 'select' ) %]
371
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]">
369
                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]" data-category="[% mv.category | html %]">
372
                     [% FOREACH aval IN mv.values %]
370
                     [% FOREACH aval IN mv.values %]
373
                         [% IF aval == mv.default %]
371
                         [% IF aval == mv.default %]
374
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
372
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
Lines 443-448 function confirmnotdup(redirect){ Link Here
443
441
444
</form>
442
</form>
445
443
444
[% INCLUDE 'modals/cataloguing_create_av.inc' %]
445
446
</div>
446
</div>
447
</div>
447
</div>
448
</div>
448
</div>
449
- 

Return to bug 25728