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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-3 / +13 lines)
Lines 342-352 Link Here
342
                                                                                </li>
342
                                                                                </li>
343
                                                                                <li>
343
                                                                                <li>
344
                                                                                    <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
344
                                                                                    <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
345
                                                                                    <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]">
345
                                                                                    <select class="budget_code_item bci_all" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]" hidden="hidden" disabled="disabled">
346
                                                                                        <option value="">Select a fund (will use default if set)</option>
346
                                                                                        <option value="">Select a fund (will use default if set)</option>
347
                                                                                        [% FOREACH budget_loo IN budget_loop %]
347
                                                                                        [% FOREACH budget_loo IN budget_loop %]
348
                                                                                            [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
348
                                                                                            [% IF ( budget_loo.b_active ) %]
349
                                                                                            [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
349
                                                                                                [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]
350
                                                                                                    <option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
351
                                                                                                [% ELSE %]
352
                                                                                                    <option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
353
                                                                                                [% END %]
354
                                                                                            [% ELSE %]
355
                                                                                                [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]
356
                                                                                                <option value="[% budget_loo.b_id | html %]" class="buget_item_inactive" selected="selected">[% budget_loo.b_txt | html %] (inactive)</option>
357
                                                                                                [% ELSE %]
358
                                                                                                <option value="[% budget_loo.b_id | html %]" class="budget_item_inactive">[% budget_loo.b_txt | html %] (inactive)</option>
359
                                                                                                [% END %]
350
                                                                                            [% END %]
360
                                                                                            [% END %]
351
                                                                                        [% END %]
361
                                                                                        [% END %]
352
                                                                                    </select>
362
                                                                                    </select>
(-)a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js (-1 / +17 lines)
Lines 6-17 $(document).ready(function() { Link Here
6
    $("select[name='all_budget_id'] .b_inactive").remove();
6
    $("select[name='all_budget_id'] .b_inactive").remove();
7
    $("select[name='budget_id'] .b_inactive").remove();
7
    $("select[name='budget_id'] .b_inactive").remove();
8
8
9
    $(".budget_code_item").each(function(){
10
        let active_only = $(this).clone();
11
        active_only.children().remove('.budget_item_inactive');
12
        active_only.attr('id', this.id + '_active');
13
        active_only.prop('hidden',false);
14
        active_only.prop('disabled',false);
15
        active_only.removeClass('bci_all').addClass('bci_active');
16
        $(this).after(active_only);
17
    });
18
    $(".budget_code_item").change(function(){
19
        $(this).siblings('select').val( $(this).val() );
20
    });
21
9
    $("#showallbudgets").click(function() {
22
    $("#showallbudgets").click(function() {
10
        if ($(this).is(":checked")) {
23
        if ($(this).is(":checked")) {
11
            $("select[name='budget_id']").html(disabledBudgetsCopy)
24
            $("select[name='budget_id']").html(disabledBudgetsCopy)
25
            $(".bci_active").prop('disabled',true).prop('hidden',true);
26
            $(".bci_all").prop('disabled',false).prop('hidden',false);
12
        }
27
        }
13
        else {
28
        else {
14
            $("select[name='budget_id'] .b_inactive").remove();
29
            $("select[name='budget_id'] .b_inactive").remove();
30
            $(".bci_active").prop('disabled',false).prop('hidden',false);
31
            $(".bci_all").prop('disabled',true).prop('hidden',true);
15
        }
32
        }
16
    });
33
    });
17
34
18
- 

Return to bug 22712