|
Lines 280-299
Link Here
|
| 280 |
<input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | html %]" class="flatpickr" /> |
280 |
<input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | html %]" class="flatpickr" /> |
| 281 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
281 |
<div class="hint">[% INCLUDE 'date-format.inc' %]</div> |
| 282 |
</li> |
282 |
</li> |
| 283 |
<li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund"> |
283 |
<li> |
| 284 |
<option value="">Keep current ([% budget_period_description | html %] - [% order.fund.budget_name | html %])</option> |
284 |
<label class="required" for="bookfund">Fund: </label> |
| 285 |
[% FOREACH period IN budget_loop %] |
285 |
[% active_count = 0 %] |
| 286 |
<optgroup label="[% period.description | html %]"> |
286 |
[% IF !ordernumber %] |
| 287 |
[% FOREACH fund IN period.funds %] |
287 |
[% FOREACH budget_loo IN budget_loop %] |
| 288 |
[% IF ( fund.b_sel ) %] |
288 |
[% active_count= active_count + budget_loo.b_active %] |
| 289 |
<option value="[% fund.b_id | html %]" selected="selected">[% fund.b_txt | html %]</option> |
289 |
[% END %] |
| 290 |
[% ELSE %] |
290 |
[% END %] |
| 291 |
<option value="[% fund.b_id | html %]">[% fund.b_txt | html %]</option> |
291 |
<select class="select2" id="bookfund" name="bookfund"> |
| 292 |
[% END %] |
292 |
[% FOREACH budget_loo IN budget_loop %] |
|
|
293 |
[% level_indent_cnt = 0 %] |
| 294 |
[% level_indent = "" %] |
| 295 |
[% WHILE level_indent_cnt < budget_loo.b_level %] |
| 296 |
[% level_indent = level_indent _ " -- " %] |
| 297 |
[% level_indent_cnt = level_indent_cnt +1 %] |
| 298 |
[% END %] |
| 299 |
|
| 300 |
[% IF ( budget_loo.b_sel ) %] |
| 301 |
[% active_count = 0 #select no other fund %] |
| 302 |
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
| 303 |
> |
| 304 |
[% ELSIF active_count==1 && budget_loo.b_active %] |
| 305 |
<option value="[% budget_loo.b_id | html %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
| 306 |
> |
| 307 |
[% ELSE %] |
| 308 |
[% bdgclass=budget_loo.b_active? "": "b_inactive" | html %] |
| 309 |
<option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" |
| 310 |
> |
| 293 |
[% END %] |
311 |
[% END %] |
| 294 |
</optgroup> |
312 |
[% level_indent | html %][% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] |
|
|
313 |
</option> |
| 295 |
[% END %] |
314 |
[% END %] |
| 296 |
</select></li> |
315 |
</select> |
|
|
316 |
<span class="required">Required</span> |
| 317 |
<label for="showallbudgets" style="float:none;"> Show inactive:</label> |
| 318 |
<input type="checkbox" id="showallbudgets" /> |
| 319 |
</li> |
| 297 |
<li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li> |
320 |
<li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li> |
| 298 |
<li> |
321 |
<li> |
| 299 |
<label for="creator">Ordered by: </label> |
322 |
<label for="creator">Ordered by: </label> |
|
Lines 427-432
Link Here
|
| 427 |
[% INCLUDE 'calendar.inc' %] |
450 |
[% INCLUDE 'calendar.inc' %] |
| 428 |
[% Asset.js("js/additem.js") | $raw %] |
451 |
[% Asset.js("js/additem.js") | $raw %] |
| 429 |
[% Asset.js("js/cataloging.js") | $raw %] |
452 |
[% Asset.js("js/cataloging.js") | $raw %] |
|
|
453 |
[% INCLUDE 'select2.inc' %] |
| 430 |
<script> |
454 |
<script> |
| 431 |
function Check(form) { |
455 |
function Check(form) { |
| 432 |
[% IF (AcqCreateItem == 'receiving') %] |
456 |
[% IF (AcqCreateItem == 'receiving') %] |
|
Lines 521-526
Link Here
|
| 521 |
[% END %] |
545 |
[% END %] |
| 522 |
|
546 |
|
| 523 |
$(document).ready(function() { |
547 |
$(document).ready(function() { |
|
|
548 |
|
| 549 |
//keep a copy of all budgets before removing the inactives |
| 550 |
disabledBudgetsCopy = $('#bookfund').html(); |
| 551 |
$('#bookfund .b_inactive').remove(); |
| 552 |
|
| 553 |
$('#showallbudgets').click(function() { |
| 554 |
if ($(this).is(":checked")) { |
| 555 |
$('#bookfund').html(disabledBudgetsCopy); //Puts back all the funds |
| 556 |
} |
| 557 |
else { |
| 558 |
$('#bookfund .b_inactive').remove(); |
| 559 |
} |
| 560 |
}); |
| 561 |
|
| 524 |
[% IF (AcqCreateItem == 'receiving') %] |
562 |
[% IF (AcqCreateItem == 'receiving') %] |
| 525 |
cloneItemBlock(0, '[% Koha.Preference('UniqueItemFields') | html %]'); |
563 |
cloneItemBlock(0, '[% Koha.Preference('UniqueItemFields') | html %]'); |
| 526 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
564 |
[% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %] |
| 527 |
- |
|
|