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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-1 / +1 lines)
Lines 211-217 Link Here
211
                                                                        <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
211
                                                                        <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
212
                                                                    [% ELSE %]
212
                                                                    [% ELSE %]
213
                                                                        <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
213
                                                                        <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
214
                                                                        <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id_[% biblio.import_record_id | html %]">
214
                                                                        <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id_[% biblio.import_record_id | html %]" class="fund_selector">
215
                                                                            <option value="">Select a fund (will use default if set)</option>
215
                                                                            <option value="">Select a fund (will use default if set)</option>
216
                                                                            [% FOREACH budget IN budget_loop %]
216
                                                                            [% FOREACH budget IN budget_loop %]
217
                                                                                [% IF ( budget.b_id == biblio.budget_id ) %]
217
                                                                                [% IF ( budget.b_id == biblio.budget_id ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js (-7 / +6 lines)
Lines 2-10 Link Here
2
$(document).ready(function() {
2
$(document).ready(function() {
3
    // keep copy of the inactive budgets
3
    // keep copy of the inactive budgets
4
    disabledAllBudgetsCopy = $("select[name='all_budget_id']").html();
4
    disabledAllBudgetsCopy = $("select[name='all_budget_id']").html();
5
    disabledBudgetsCopy = $("select[name='budget_id']").first().html();
5
    disabledBudgetsCopy = $("select[name='budget_id'], .fund_selector").first().html();
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, .fund_selector .b_inactive").remove();
8
8
9
    $(".budget_code_item").each(function(){
9
    $(".budget_code_item").each(function(){
10
        let active_only = $(this).clone();
10
        let active_only = $(this).clone();
Lines 21-32 $(document).ready(function() { Link Here
21
21
22
    $("#showallbudgets").click(function() {
22
    $("#showallbudgets").click(function() {
23
        if ($(this).is(":checked")) {
23
        if ($(this).is(":checked")) {
24
            $("select[name='budget_id']").html(disabledBudgetsCopy)
24
            $("select[name='budget_id'], .fund_selector").html(disabledBudgetsCopy)
25
            $(".bci_active").prop('disabled',true).prop('hidden',true);
25
            $(".bci_active").prop('disabled',true).prop('hidden',true);
26
            $(".bci_all").prop('disabled',false).prop('hidden',false);
26
            $(".bci_all").prop('disabled',false).prop('hidden',false);
27
        }
27
        }
28
        else {
28
        else {
29
            $("select[name='budget_id'] .b_inactive").remove();
29
            $("select[name='budget_id'] .b_inactive, .fund_selector .b_inactive").remove();
30
            $(".bci_active").prop('disabled',false).prop('hidden',false);
30
            $(".bci_active").prop('disabled',false).prop('hidden',false);
31
            $(".bci_all").prop('disabled',true).prop('hidden',true);
31
            $(".bci_all").prop('disabled',true).prop('hidden',true);
32
        }
32
        }
Lines 41-47 $(document).ready(function() { Link Here
41
        }
41
        }
42
    });
42
    });
43
43
44
    $("select[name='budget_id']").change(function(){
44
    $("select[name='budget_id'], .fund_selector").change(function(){
45
        var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
45
        var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
46
        var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
46
        var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
47
        var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
47
        var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]');
Lines 59-65 $(document).ready(function() { Link Here
59
        getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
59
        getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
60
    } );
60
    } );
61
61
62
    $("select[name='budget_id']").change();
62
    $("select[name='budget_id'], .fund_selector").change();
63
63
64
    $("select[name='all_budget_id']").change(function(){
64
    $("select[name='all_budget_id']").change(function(){
65
        var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
65
        var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
66
- 

Return to bug 35823