Lines 340-369
Link Here
|
340 |
<label class="required" for="budget_id">Fund: </label> |
340 |
<label class="required" for="budget_id">Fund: </label> |
341 |
[% active_count = 0 %] |
341 |
[% active_count = 0 %] |
342 |
[% IF !ordernumber %] |
342 |
[% IF !ordernumber %] |
343 |
[% FOREACH budget_loo IN budget_loop %] |
343 |
[% FOREACH period IN budget_loop %] |
344 |
[% active_count= active_count + budget_loo.b_active %] |
344 |
[% FOREACH fund IN period.funds %] |
|
|
345 |
[% active_count= active_count + fund.b_active %] |
346 |
[% END %] |
345 |
[% END %] |
347 |
[% END %] |
346 |
[% END %] |
348 |
[% END %] |
347 |
<select id="budget_id" size="1" name="budget_id"> |
349 |
<select id="budget_id" size="1" name="budget_id"> |
348 |
<option value="">Select a fund</option> |
350 |
<option value="">Select a fund</option> |
349 |
[% FOREACH budget_loo IN budget_loop %] |
351 |
[% FOREACH period IN budget_loop %] |
350 |
[% IF ( budget_loo.b_sel ) %] |
352 |
<optgroup label="[% period.description | html %]"> |
351 |
[% active_count = 0 #select no other fund %] |
353 |
[% FOREACH fund IN period.funds %] |
352 |
<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 %]" |
354 |
[% IF ( fund.b_sel ) %] |
353 |
style="padding-left:[% budget_loo.b_level | html %]em;" |
355 |
[% active_count = 0 #select no other fund %] |
354 |
> |
356 |
<option value="[% fund.b_id | html %]" selected="selected" data-sort1-authcat="[% fund.b_sort1_authcat | html %]" data-sort2-authcat="[% fund.b_sort2_authcat | html %]" |
355 |
[% ELSIF active_count==1 && budget_loo.b_active %] |
357 |
style="padding-left:[% fund.b_level | html %]em;" |
356 |
<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 %]" |
358 |
> |
357 |
style="padding-left:[% budget_loo.b_level | html %]em;" |
359 |
[% ELSIF active_count==1 && fund.b_active %] |
358 |
> |
360 |
<option value="[% fund.b_id | html %]" selected="selected" data-sort1-authcat="[% fund.b_sort1_authcat | html %]" data-sort2-authcat="[% fund.b_sort2_authcat | html %]" |
359 |
[% ELSE %] |
361 |
style="padding-left:[% fund.b_level | html %]em;" |
360 |
[% bdgclass=budget_loo.b_active? "": "b_inactive" | html %] |
362 |
> |
361 |
<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 %]" |
363 |
[% ELSE %] |
362 |
style="padding-left:[% budget_loo.b_level | html %]em;" |
364 |
[% bdgclass=fund.b_active? "": "b_inactive" | html %] |
363 |
> |
365 |
<option value="[% fund.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% fund.b_sort1_authcat | html %]" data-sort2-authcat="[% fund.b_sort2_authcat | html %]" |
|
|
366 |
style="padding-left:[% fund.b_level | html %]em;" |
367 |
> |
368 |
[% END %] |
369 |
[% fund.b_txt | html %][% IF !fund.b_active %] (inactive)[% END %] |
370 |
</option> |
364 |
[% END %] |
371 |
[% END %] |
365 |
[% budget_loo.b_txt | html %][% IF !budget_loo.b_active %] (inactive)[% END %] |
372 |
</optgroup> |
366 |
</option> |
|
|
367 |
[% END %] |
373 |
[% END %] |
368 |
</select> |
374 |
</select> |
369 |
<span class="required">Required</span> |
375 |
<span class="required">Required</span> |