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