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

(-)a/acqui/addorderiso2709.pl (+5 lines)
Lines 307-315 foreach my $r ( @{$budgets_hierarchy} ) { Link Here
307
        b_txt => $r->{budget_name},
307
        b_txt => $r->{budget_name},
308
        b_sort1_authcat => $r->{'sort1_authcat'},
308
        b_sort1_authcat => $r->{'sort1_authcat'},
309
        b_sort2_authcat => $r->{'sort2_authcat'},
309
        b_sort2_authcat => $r->{'sort2_authcat'},
310
        b_active => $r->{budget_period_active},
310
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
311
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
311
      };
312
      };
312
}
313
}
314
315
@{$budget_loop} =
316
  sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop};
317
313
$template->param( budget_loop    => $budget_loop,);
318
$template->param( budget_loop    => $budget_loop,);
314
319
315
my $CGIsort1;
320
my $CGIsort1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-7 / +34 lines)
Lines 27-32 Link Here
27
            "sPaginationType": "four_button"
27
            "sPaginationType": "four_button"
28
        } ) );
28
        } ) );
29
29
30
        //keep a copy of all budgets before removing the inactives
31
        disabledBudgetsCopy = $("select[name='all_budget_id']").html();
32
        $("select[name='all_budget_id'] .b_inactive").remove();
33
        $("select[name='budget_id'] .b_inactive").remove();
34
35
        $("#showallbudgets").click(function() {
36
            if ($(this).is(":checked")) {
37
                $("select[name='budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
38
            }
39
            else {
40
                $("select[name='budget_id'] .b_inactive").remove();
41
            }
42
        });
43
44
        $("#all_showallbudgets").click(function() {
45
            if ($(this).is(":checked")) {
46
                $("select[name='all_budget_id']").html(disabledBudgetsCopy); //Puts back all the funds
47
            }
48
            else {
49
                $("select[name='all_budget_id'] .b_inactive").remove();
50
            }
51
        });
52
30
        $("select[name='budget_id']").change(function(){
53
        $("select[name='budget_id']").change(function(){
31
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
54
            var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
32
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
55
            var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
Lines 142-147 Link Here
142
                  <div id="records_to_import">
165
                  <div id="records_to_import">
143
                    <span class="checkall"><a id="checkAll" href="#">Check All</a></span>
166
                    <span class="checkall"><a id="checkAll" href="#">Check All</a></span>
144
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span>
167
                    <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span>
168
                    <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show all funds:</label>
169
                    <input type="checkbox" id="showallbudgets" />
145
                    <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
170
                    <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
146
                        <input type="hidden" name="op" value="import_records"/>
171
                        <input type="hidden" name="op" value="import_records"/>
147
                        <input type="hidden" name="basketno" value="[% basketno %]" />
172
                        <input type="hidden" name="basketno" value="[% basketno %]" />
Lines 195-206 Link Here
195
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
220
                                  <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %]
196
                                [% ELSE %]
221
                                [% ELSE %]
197
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
222
                                  <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id">
198
                                    <option value=""></option>
223
                                    <option value="">Select a fund</option>
199
                                    [% FOREACH budget IN budget_loop %]
224
                                    [% FOREACH budget IN budget_loop %]
200
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
225
                                        [% IF ( budget.b_id == biblio.budget_id ) %]
201
                                            <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>
226
                                            <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>
202
                                        [% ELSE %]
227
                                        [% ELSE %]
203
                                            <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option>
228
                                            [% 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>
229
                                            [% 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>
230
                                            [% END %]
204
                                        [% END %]
231
                                        [% END %]
205
                                    [% END %]
232
                                    [% END %]
206
                                  </select>
233
                                  </select>
Lines 277-290 Link Here
277
                                        <li>
304
                                        <li>
278
                                            <label for="all_budget_id">Fund: </label>
305
                                            <label for="all_budget_id">Fund: </label>
279
                                            <select id="all_budget_id" size="1" name="all_budget_id">
306
                                            <select id="all_budget_id" size="1" name="all_budget_id">
307
                                              <option value="">Select a fund</option>
280
                                            [% FOREACH budget_loo IN budget_loop %]
308
                                            [% FOREACH budget_loo IN budget_loop %]
281
                                                [% IF ( budget_loo.b_sel ) %]
309
                                                [% 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>
282
                                                    <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>
310
                                                [% 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>
283
                                                [% ELSE %]
284
                                                    <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>
285
                                                [% END %]
311
                                                [% END %]
286
                                            [% END %]
312
                                            [% END %]
287
                                            </select>
313
                                            </select>
314
                                            <label for="all_showallbudgets" style="float:none;width:auto;">&nbsp;Show all:</label>
315
                                            <input type="checkbox" id="all_showallbudgets" />
288
                                        </li>
316
                                        </li>
289
                                    [% END %]
317
                                    [% END %]
290
                                </li>
318
                                </li>
291
- 

Return to bug 10875