This commit was generated by cvs2svn to compensate for changes in r2523,
[freeside.git] / rt / webrt / Elements / SelectKeyword
1 <SELECT NAME=<%$Name%> <%$Size%> <%$Multiple%>>
2 <OPTION VALUE="">-</OPTION>
3 <OPTION VALUE="NULL">(empty)</OPTION>
4 %   foreach my $kid ( keys %{$Descendents} ) {
5 <OPTION VALUE="<% $kid %>" 
6 %if ($kid == $Default) {
7 SELECTED
8 %}
9 ><% $Descendents->{$kid} %></OPTION>
10 % }
11 </SELECT>
12
13
14 <%INIT>
15
16 unless (defined $KeywordObj) {
17     $KeywordObj = new RT::Keyword($session{'CurrentUser'});
18     $KeywordObj->Load($Root);
19 }
20 my $Descendents = $KeywordObj->Descendents();
21
22 if ($Multiple) {
23         $Multiple = "MULTIPLE";
24 }
25 if ($Size) {
26         $Size="SIZE=$Size";
27 }       
28
29
30 </%INIT>
31 <%ARGS>
32 $Multiple => undef
33 $Size => undef
34 $Name => 'Keyword'
35 $KeywordObj => undef
36 $Root => 0
37 $Default => undef
38 </%ARGS>