This commit was generated by cvs2svn to compensate for changes in r2526,
[freeside.git] / rt / webrt / Elements / yearMenu
1 <%doc>-------------------------------------------------------------------
2 yearMenu: Display a pulldown menu of years.
3
4 Optional arguments:
5 $menu_name - Name of menu, defaults to 'year'
6 $current - Selected year value
7 $min - Minimum year appearing in menu; defaults to current year
8 $max - Maximum year appearing in menus; defaults to $min plus 10.
9 -------------------------------------------------------------------</%doc>
10
11 <select name="<% $menu_name %>">
12 <option value="-1">-
13 % foreach my $year ($min..$max) {
14 <option value="<% $year %>" <% $year==$current ? "selected" : "" %>>
15 <% $year %>
16 % }
17 </select>
18
19 <%args>
20 $menu_name=>'year'
21 $current=>(localtime)[5]+1900
22 $min=>(localtime)[5]+1900-1
23 $max=>$min+10
24 </%args>