View | Details | Raw Unified | Return to bug 10875
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 31-36 Link Here
31
            "aaSorting": []
31
            "aaSorting": []
32
        } ) );
32
        } ) );
33
33
34
        //keep a copy of all budgets before removing the inactives
35
        disabledBudgetsCopy = $("select[name='all_budget_id']").html();
36
        $("select[name='all_budget_id'] .b_inactive").remove();
37
        $("select[name='budget_id'] .b_inactive").remove();
38
39
        $("#showallbudgets").click(function() {
40
            if ($(this).is(":checked")) {
41
                $("select[name='budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
42
            }
43
            else {
44
                $("select[name='budget_id'] .b_inactive").remove();
45
            }
46
        });
47
48
        $("#all_showallbudgets").click(function() {
49
            if ($(this).is(":checked")) {
50
                $("select[name='all_budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
51
            }
52
            else {
53
                $("select[name='all_budget_id'] .b_inactive").remove();
54
            }
55
        });
56
34
        $("select[name='budget_id']").change(function(){
57
        $("select[name='budget_id']").change(function(){
35
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
58
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
36
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
59
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
Lines 153-158 Link Here
153
                  <div id="records_to_import">
176
                  <div id="records_to_import">
154
                    <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
177
                    <span class="checkall"><a id="checkAll" href="#">Check all</a></span>
155
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
178
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span>
179
                    <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show all funds:</label>
180
                    <input type="checkbox" id="showallbudgets" />
156
                        <input type="hidden" name="op" value="import_records"/>
181
                        <input type="hidden" name="op" value="import_records"/>
157
                        <input type="hidden" name="basketno" value="[% basketno %]" />
182
                        <input type="hidden" name="basketno" value="[% basketno %]" />
158
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
183
                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
Lines 210-221 Link Here
210
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
235
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
211
                                [% ELSE %]
236
                                [% ELSE %]
212
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
237
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
213
                                    <option value=""></option>
238
                                    <option value="">Select a fund</option>
214
                                    [% FOREACH budget IN budget_loop %]
239
                                    [% FOREACH budget IN budget_loop %]
215
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
240
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
216
                                            <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>
241
                                            <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>
217
                                        [% ELSE %]
242
                                        [% ELSE %]
218
                                            <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
243
                                            [% 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>
244
                                            [% 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>
245
                                            [% END %]
219
                                        [% END %]
246
                                        [% END %]
220
                                    [% END %]
247
                                    [% END %]
221
                                  </select>
248
                                  </select>
Lines 300-313 Link Here
300
                                        <li>
327
                                        <li>
301
                                            <label for="all_budget_id">Fund: </label>
328
                                            <label for="all_budget_id">Fund: </label>
302
                                            <select id="all_budget_id" size="1" name="all_budget_id">
329
                                            <select id="all_budget_id" size="1" name="all_budget_id">
330
                                              <option value="">Select a fund</option>
303
                                            [% FOREACH budget_loo IN budget_loop %]
331
                                            [% FOREACH budget_loo IN budget_loop %]
304
                                                [% IF ( budget_loo.b_sel ) %]
332
                                                [% 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>
305
                                                    <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>
333
                                                [% 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>
306
                                                [% ELSE %]
307
                                                    <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>
308
                                                [% END %]
334
                                                [% END %]
309
                                            [% END %]
335
                                            [% END %]
310
                                            </select>
336
                                            </select>
337
                                            <label for="all_showallbudgets" style="float:none;width:auto;">&nbsp;Show all:</label>
338
                                            <input type="checkbox" id="all_showallbudgets" />
311
                                        </li>
339
                                        </li>
312
                                    [% END %]
340
                                    [% END %]
313
                                </li>
341
                                </li>
314
- 

Return to bug 10875