diff options
Diffstat (limited to 'rt/webrt/Elements/yearMenu')
-rwxr-xr-x | rt/webrt/Elements/yearMenu | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rt/webrt/Elements/yearMenu b/rt/webrt/Elements/yearMenu new file mode 100755 index 000000000..4a0e7a772 --- /dev/null +++ b/rt/webrt/Elements/yearMenu @@ -0,0 +1,24 @@ +<%doc>------------------------------------------------------------------- +yearMenu: Display a pulldown menu of years. + +Optional arguments: +$menu_name - Name of menu, defaults to 'year' +$current - Selected year value +$min - Minimum year appearing in menu; defaults to current year +$max - Maximum year appearing in menus; defaults to $min plus 10. +-------------------------------------------------------------------</%doc> + +<select name="<% $menu_name %>"> +<option value="-1">- +% foreach my $year ($min..$max) { +<option value="<% $year %>" <% $year==$current ? "selected" : "" %>> +<% $year %> +% } +</select> + +<%args> +$menu_name=>'year' +$current=>(localtime)[5]+1900 +$min=>(localtime)[5]+1900-1 +$max=>$min+10 +</%args> |