diff options
author | ivan <ivan> | 2002-08-12 06:17:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-08-12 06:17:09 +0000 |
commit | 3ef62a0570055da710328937e7f65dbb2c027c62 (patch) | |
tree | d549158b172fd499b4f81a2981b62aabbde4f99b /rt/webrt/Ticket/Elements/EditKeywordSelects | |
parent | 030438c9cb1c12ccb79130979ef0922097b4311a (diff) |
import rt 2.0.14
Diffstat (limited to 'rt/webrt/Ticket/Elements/EditKeywordSelects')
-rw-r--r-- | rt/webrt/Ticket/Elements/EditKeywordSelects | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/rt/webrt/Ticket/Elements/EditKeywordSelects b/rt/webrt/Ticket/Elements/EditKeywordSelects new file mode 100644 index 000000000..34ade9f25 --- /dev/null +++ b/rt/webrt/Ticket/Elements/EditKeywordSelects @@ -0,0 +1,45 @@ + +<TABLE> + <TR> +% while ( my $KeywordSelect = $KeywordSelects->Next ) { +% my $CurrentKeywords = $TicketObj->KeywordsObj($KeywordSelect->id); +% my $Descendents = $KeywordSelect->KeywordObj->Descendents; + <TD VALIGN=TOP> + <% $KeywordSelect->Name %> + <BR> + <INPUT TYPE="hidden" NAME="KeywordSelectMagic<% $KeywordSelect->id %>" VALUE="1"> + <SELECT NAME="KeywordSelect<% $KeywordSelect->id %>" + <% $KeywordSelect->Single ? "" : " MULTIPLE " %> SIZE=5> +%# +%# +%# All of this cruft is so we have a 'no keyword' selector for single +%# keywords that's only selected when there's no value. +% +% my $selected_keywords = 0; +% foreach my $kid ( keys %{$Descendents} ) { +% my $selected = 0; +% if ($CurrentKeywords->HasEntry($kid)) { $selected_keywords++; $selected=1;} + <OPTION VALUE="<% $kid %>" + <% $selected && 'SELECTED'%>> + <% $Descendents->{$kid} %> + </OPTION> +% } +% if ( $KeywordSelect->Single) { +<OPTION VALUE="" <% ($selected_keywords == 0) && 'SELECTED' %> >(empty)</OPTION> +% } + </SELECT> + </TD> +% } + </TR> + +</TABLE> + + +<%INIT> +my $KeywordSelects = $TicketObj->QueueObj->KeywordSelects; +</%INIT> + +<%ARGS> +$TicketObj => undef +</%ARGS> + |