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

(-)a/acqui/addorderiso2709.pl (+5 lines)
Lines 306-314 foreach my $r ( @{$budgets_hierarchy} ) { Link Here
306
        b_txt => $r->{budget_name},
306
        b_txt => $r->{budget_name},
307
        b_sort1_authcat => $r->{'sort1_authcat'},
307
        b_sort1_authcat => $r->{'sort1_authcat'},
308
        b_sort2_authcat => $r->{'sort2_authcat'},
308
        b_sort2_authcat => $r->{'sort2_authcat'},
309
        b_active => $r->{budget_period_active},
309
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
310
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
310
      };
311
      };
311
}
312
}
313
314
@{$budget_loop} =
315
  sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop};
316
312
$template->param( budget_loop    => $budget_loop,);
317
$template->param( budget_loop    => $budget_loop,);
313
318
314
my $CGIsort1;
319
my $CGIsort1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-7 / +34 lines)
Lines 26-31 Link Here
26
            "aaSorting": []
26
            "aaSorting": []
27
        } ) );
27
        } ) );
28
28
29
        //keep a copy of all budgets before removing the inactives
30
        disabledBudgetsCopy = $("select[name='all_budget_id']").html();
31
        $("select[name='all_budget_id'] .b_inactive").remove();
32
        $("select[name='budget_id'] .b_inactive").remove();
33
34
        $("#showallbudgets").click(function() {
35
            if ($(this).is(":checked")) {
36
                $("select[name='budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
37
            }
38
            else {
39
                $("select[name='budget_id'] .b_inactive").remove();
40
            }
41
        });
42
43
        $("#all_showallbudgets").click(function() {
44
            if ($(this).is(":checked")) {
45
                $("select[name='all_budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
46
            }
47
            else {
48
                $("select[name='all_budget_id'] .b_inactive").remove();
49
            }
50
        });
51
29
        $("select[name='budget_id']").change(function(){
52
        $("select[name='budget_id']").change(function(){
30
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
53
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
31
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
54
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
Lines 150-155 Link Here
150
                  <div id="records_to_import">
173
                  <div id="records_to_import">
151
                    <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
174
                    <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
152
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
175
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
176
                    <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show all funds:</label>
177
                    <input type="checkbox" id="showallbudgets" />
153
                        <input type="hidden" name="op" value="import_records"/>
178
                        <input type="hidden" name="op" value="import_records"/>
154
                        <input type="hidden" name="basketno" value="[% basketno %]" />
179
                        <input type="hidden" name="basketno" value="[% basketno %]" />
155
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
180
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
Lines 207-218 Link Here
207
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
232
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
208
                                [% ELSE %]
233
                                [% ELSE %]
209
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
234
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
210
                                    <option value=""></option>
235
                                    <option value="">Select a fund</option>
211
                                    [% FOREACH budget IN budget_loop %]
236
                                    [% FOREACH budget IN budget_loop %]
212
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
237
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
213
                                            <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]" selected="selected">[% budget.b_txt %]</option>
238
                                            <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]" selected="selected">[% budget.b_txt %]</option>
214
                                        [% ELSE %]
239
                                        [% ELSE %]
215
                                            <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
240
                                            [% IF budget.b_active %]<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
241
                                            [% ELSE %]<option value="[% budget.b_id %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
242
                                            [% END %]
216
                                        [% END %]
243
                                        [% END %]
217
                                    [% END %]
244
                                    [% END %]
218
                                  </select>
245
                                  </select>
Lines 297-310 Link Here
297
                                        <li>
324
                                        <li>
298
                                            <label for="all_budget_id">Fund: </label>
325
                                            <label for="all_budget_id">Fund: </label>
299
                                            <select id="all_budget_id" size="1" name="all_budget_id">
326
                                            <select id="all_budget_id" size="1" name="all_budget_id">
327
                                              <option value="">Select a fund</option>
300
                                            [% FOREACH budget_loo IN budget_loop %]
328
                                            [% FOREACH budget_loo IN budget_loop %]
301
                                                [% IF ( budget_loo.b_sel ) %]
329
                                                [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option>
302
                                                    <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" selected="selected">[% budget_loo.b_txt %]</option>
330
                                                [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option>
303
                                                [% ELSE %]
304
                                                    <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option>
305
                                                [% END %]
331
                                                [% END %]
306
                                            [% END %]
332
                                            [% END %]
307
                                            </select>
333
                                            </select>
334
                                            <label for="all_showallbudgets" style="float:none;width:auto;">&nbsp;Show all:</label>
335
                                            <input type="checkbox" id="all_showallbudgets" />
308
                                        </li>
336
                                        </li>
309
                                    [% END %]
337
                                    [% END %]
310
                                </li>
338
                                </li>
311
- 

Return to bug 7180