Lines 327-356
Link Here
|
327 |
<label class="required" for="budget_id">Fund: </label> |
327 |
<label class="required" for="budget_id">Fund: </label> |
328 |
[% active_count = 0 %] |
328 |
[% active_count = 0 %] |
329 |
[% IF !ordernumber %] |
329 |
[% IF !ordernumber %] |
330 |
[% FOREACH budget_loo IN budget_loop %] |
330 |
[% FOREACH period IN budget_loop %] |
331 |
[% active_count= active_count + budget_loo.b_active %] |
331 |
[% FOREACH fund IN period.funds %] |
|
|
332 |
[% active_count= active_count + fund.b_active %] |
333 |
[% END %] |
332 |
[% END %] |
334 |
[% END %] |
333 |
[% END %] |
335 |
[% END %] |
334 |
<select id="budget_id" size="1" name="budget_id"> |
336 |
<select id="budget_id" size="1" name="budget_id"> |
335 |
<option value="">Select a fund</option> |
337 |
<option value="">Select a fund</option> |
336 |
[% FOREACH budget_loo IN budget_loop %] |
338 |
[% FOREACH period IN budget_loop %] |
337 |
[% IF ( budget_loo.b_sel ) %] |
339 |
<optgroup label="[% period.description %]"> |
338 |
[% active_count = 0 #select no other fund %] |
340 |
[% FOREACH fund IN period.funds %] |
339 |
<option value="[% budget_loo.b_id %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" |
341 |
[% IF ( fund.b_sel ) %] |
340 |
style="padding-left:[% budget_loo.b_level %]em;" |
342 |
[% active_count = 0 #select no other fund %] |
341 |
> |
343 |
<option value="[% fund.b_id %]" selected="selected" data-sort1-authcat="[% fund.b_sort1_authcat %]" data-sort2-authcat="[% fund.b_sort2_authcat %]" |
342 |
[% ELSIF active_count==1 && budget_loo.b_active %] |
344 |
style="padding-left:[% fund.b_level %]em;" |
343 |
<option value="[% budget_loo.b_id %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" |
345 |
> |
344 |
style="padding-left:[% budget_loo.b_level %]em;" |
346 |
[% ELSIF active_count==1 && fund.b_active %] |
345 |
> |
347 |
<option value="[% fund.b_id %]" selected="selected" data-sort1-authcat="[% fund.b_sort1_authcat %]" data-sort2-authcat="[% fund.b_sort2_authcat %]" |
346 |
[% ELSE %] |
348 |
style="padding-left:[% fund.b_level %]em;" |
347 |
[% bdgclass=budget_loo.b_active? "": "b_inactive" %] |
349 |
> |
348 |
<option value="[% budget_loo.b_id %]" class="[% bdgclass %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" |
350 |
[% ELSE %] |
349 |
style="padding-left:[% budget_loo.b_level %]em;" |
351 |
[% bdgclass=fund.b_active? "": "b_inactive" %] |
350 |
> |
352 |
<option value="[% fund.b_id %]" class="[% bdgclass %]" data-sort1-authcat="[% fund.b_sort1_authcat %]" data-sort2-authcat="[% fund.b_sort2_authcat %]" |
|
|
353 |
style="padding-left:[% fund.b_level %]em;" |
354 |
> |
355 |
[% END %] |
356 |
[% fund.b_txt %][% IF !fund.b_active %] (inactive)[% END %] |
357 |
</option> |
351 |
[% END %] |
358 |
[% END %] |
352 |
[% budget_loo.b_txt %][% IF !budget_loo.b_active %] (inactive)[% END %] |
359 |
</optgroup> |
353 |
</option> |
|
|
354 |
[% END %] |
360 |
[% END %] |
355 |
</select> |
361 |
</select> |
356 |
<span class="required">Required</span> |
362 |
<span class="required">Required</span> |