certificates ala communigate, RT#7515
[freeside.git] / httemplate / edit / part_svc.cgi
index 6fe015a..e14acb5 100755 (executable)
@@ -15,6 +15,7 @@ Disable new orders <INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"<% $hashref->
 Service definitions are the templates for items you offer to your customers.
 <UL><LI>svc_acct - Accounts - anything with a username (Mailboxes, PPP accounts, shell accounts, RADIUS entries for broadband, etc.)
     <LI>svc_domain - Domains
+    <LI>svc_cert - Certificates
     <LI>svc_forward - Mail forwarding
     <LI>svc_mailinglist - Mailing list
     <LI>svc_www - Virtual domain website
@@ -291,12 +292,22 @@ that field.
 %                  (grep(/^$rvalue$/, split(',',$value)) ? ' SELECTED>' : '>' ).
 %                  $record->$select_label(). '</OPTION>';
 %            } #next $record
-%          } else { # select_list
+%          } elsif ( $def->{select_list} ) {
 %            foreach my $item ( @{$def->{select_list}} ) {
 %              $html .= qq!<OPTION VALUE="$item"!.
 %                    (grep(/^$item$/, split(',',$value)) ? ' SELECTED>' : '>' ).
 %                    $item. '</OPTION>';
 %            } #next $item
+%          } elsif ( $def->{select_hash} ) {
+%            if ( ref($def->{select_hash}) eq 'ARRAY' ) {
+%              tie my %hash, 'Tie::IxHash', @{ $def->{select_hash} };
+%              $def->{select_hash} = \%hash;
+%            }
+%            foreach my $key ( keys %{$def->{select_hash}} ) {
+%              $html .= qq!<OPTION VALUE="$key"!.
+%                    (grep(/^$key$/, split(',',$value)) ? ' SELECTED>' : '>' ).
+%                    $def->{select_hash}{$key}. '</OPTION>';
+%            } #next $key
 %          } #endif
 %          $html .= '</SELECT>';
 %