Lines 142-147
$(document).ready(function()
Link Here
|
142 |
$('#budget_id .b_inactive').remove(); |
142 |
$('#budget_id .b_inactive').remove(); |
143 |
} |
143 |
} |
144 |
}); |
144 |
}); |
|
|
145 |
|
146 |
$("#budget_id").change(function(){ |
147 |
var destination_sort1 = $(this).parents('fieldset.rows').find('input[name="sort1"]'); |
148 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
149 |
var sort1 = $(destination_sort1).val() || ""; |
150 |
if ( destination_sort1.length < 1 ) { |
151 |
destination_sort1 = $(this).parents('fieldset.rows').find('select[name="sort1"]'); |
152 |
} |
153 |
var destination_sort2 = $(this).parents('fieldset.rows').find('input[name="sort2"]'); |
154 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
155 |
var sort2 = $(destination_sort2).val() || ""; |
156 |
if ( destination_sort2.length < 1 ) { |
157 |
destination_sort2 = $(this).parents('fieldset.rows').find('select[name="sort2"]'); |
158 |
} |
159 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
160 |
getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); |
161 |
}); |
162 |
$("#budget_id").change(); |
145 |
}); |
163 |
}); |
146 |
//]]> |
164 |
//]]> |
147 |
</script> |
165 |
</script> |
Lines 415-428
$(document).ready(function()
Link Here
|
415 |
<input type="hidden" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %] |
433 |
<input type="hidden" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %] |
416 |
[% ELSE %] |
434 |
[% ELSE %] |
417 |
<label class="required" for="budget_id">Fund: </label> |
435 |
<label class="required" for="budget_id">Fund: </label> |
418 |
<select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id"> |
436 |
<select id="budget_id" size="1" name="budget_id"> |
419 |
<option value="">Select a fund</option> |
437 |
<option value="">Select a fund</option> |
420 |
[% FOREACH budget_loo IN budget_loop %] |
438 |
[% FOREACH budget_loo IN budget_loop %] |
421 |
[% IF ( budget_loo.b_sel ) %] |
439 |
[% IF ( budget_loo.b_sel ) %] |
422 |
<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option> |
440 |
<option value="[% budget_loo.b_id %]" selected="selected" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option> |
423 |
[% ELSE %] |
441 |
[% ELSE %] |
424 |
[% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option> |
442 |
[% 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> |
425 |
[% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %] (inactive)</option> |
443 |
[% 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 %] (inactive)</option> |
426 |
[% END %] |
444 |
[% END %] |
427 |
[% END %] |
445 |
[% END %] |
428 |
[% END %] |
446 |
[% END %] |
Lines 545-583
$(document).ready(function()
Link Here
|
545 |
</li> |
563 |
</li> |
546 |
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div> |
564 |
<li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div> |
547 |
<label for="sort1">Statistic 1: </label> |
565 |
<label for="sort1">Statistic 1: </label> |
548 |
<span id="sort1_zone"> |
566 |
<input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" /> |
549 |
[% IF CGIsort1 %] |
|
|
550 |
<select id="sort1" size="1" name="sort1"> |
551 |
[% FOREACH sort_opt IN CGIsort1 %] |
552 |
[% IF sort_opt.default %] |
553 |
<option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option> |
554 |
[% ELSE %] |
555 |
<option value="[% sort_opt.value %]">[% sort_opt.label %]</option> |
556 |
[% END %] |
557 |
[% END %] |
558 |
</select> |
559 |
[% ELSE %] |
560 |
<input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" /> |
561 |
[% END %] |
562 |
</span> |
563 |
</li> |
564 |
<li> |
567 |
<li> |
565 |
<label for="sort2">Statistic 2: </label> |
568 |
<label for="sort2">Statistic 2: </label> |
566 |
<span id="sort2_zone"> |
569 |
<input id="sort2" type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" /> |
567 |
[% IF CGIsort2 %] |
|
|
568 |
<select id="sort2" size="1" name="sort2"> |
569 |
[% FOREACH sort_opt IN CGIsort2 %] |
570 |
[% IF sort_opt.default %] |
571 |
<option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option> |
572 |
[% ELSE %] |
573 |
<option value="[% sort_opt.value %]">[% sort_opt.label %]</option> |
574 |
[% END %] |
575 |
[% END %] |
576 |
</select> |
577 |
[% ELSE %] |
578 |
<input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" /> |
579 |
[% END %] |
580 |
</span> |
581 |
</li> |
570 |
</li> |
582 |
</ol> |
571 |
</ol> |
583 |
</fieldset> |
572 |
</fieldset> |
584 |
- |
|
|