This commit was generated by cvs2svn to compensate for changes in r4407,
[freeside.git] / rt / html / Search / Elements / SelectPersonType
index 01f3893..d4127c9 100644 (file)
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
 %#                                          <jesse@bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
 %# works based on those contributions, and sublicense and distribute
 %# those contributions and any derivatives thereof.
 %# 
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
 <SELECT NAME ="<%$Name%>">
 % if ($AllowNull) {
 <OPTION VALUE="">-</OPTION>
 % }
-%for my $option (@types) {
-%foreach my $subtype (@subtypes) {
-<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><%loc("[_1] [_2]",$option, $subtype)%></OPTION>
+% for my $option (@types) {
+%  if ($Suffix) {
+<OPTION VALUE="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></OPTION>
+%   next;
+%  }
+%  foreach my $subtype (@subtypes) {
+<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></OPTION>
+%  }
 % }
-%}
 </SELECT>
 
 <%INIT>
@@ -59,6 +63,9 @@ my @types;
 if ($Scope =~ 'queue') {
    @types = qw(Cc AdminCc);
 }
+elsif ($Suffix eq 'Group') {
+   @types = qw(Requestor Cc AdminCc Watcher);
+}
 else { 
    @types = qw(Requestor Cc AdminCc Watcher Owner);
 }
@@ -68,6 +75,7 @@ my @subtypes = qw(EmailAddress Name RealName Nickname Organization Address1 Addr
 </%INIT>
 <%ARGS>
 $AllowNull => 1
+$Suffix => ''
 $Default=>undef
 $Scope => 'ticket'
 $Name => 'WatcherType'