communigate (phase 2): rules. RT#7514
[freeside.git] / httemplate / edit / part_svc.cgi
index d74e0f2..6fe015a 100755 (executable)
@@ -15,7 +15,8 @@ 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_forward - mail forwarding
+    <LI>svc_forward - Mail forwarding
+    <LI>svc_mailinglist - Mailing list
     <LI>svc_www - Virtual domain website
     <LI>svc_broadband - Broadband/High-speed Internet service (always-on)
     <LI>svc_phone - Customer phone numbers
@@ -65,10 +66,9 @@ that field.
 %             'condition' =>
 %               sub { !ref($_[0]) || $_[0]->{disable_select} }, 
 %           },
-%# need to template-ize httemplate/edit/svc_* first
-%#    'M' => { 'desc' => 'Manual selection from inventory',
-%#             'condition' => $inv_sub,
-%#           },
+%    'M' => { 'desc' => 'Manual selection from inventory',
+%             'condition' => $inv_sub,
+%           },
 %    'A' => { 'desc' => 'Automatically fill in from inventory',
 %             'condition' => $inv_sub,
 %           },
@@ -185,6 +185,9 @@ that field.
 %
 %          foreach my $f ( keys %flag ) {
 %
+%            # need to template-ize more httemplate/edit/svc_* first
+%            next if $f eq 'M' and $layer !~ /^svc_(broadband|external|phone)$/;
+%
 %            #here is where the SUB from above is called, to skip some choices
 %            next if $flag{$f}->{condition}
 %                 && &{ $flag{$f}->{condition} }( $def, $layer, $field );
@@ -266,6 +269,14 @@ that field.
 %                             'empty_label'  => 'Select inventory class',
 %                          );
 %
+%        } elsif ( $def->{type} eq 'checkbox' ) {
+%
+%          $html .= include('/elements/checkbox.html',
+%                             'field'      => $layer.'__'.$field,
+%                             'curr_value' => $value,
+%                             'value'      => 'Y',
+%                          );
+%
 %        } elsif ( $def->{type} eq 'select' ) {
 %
 %          $html .= qq!<SELECT NAME="${layer}__${field}" $disabled!;
@@ -289,9 +300,16 @@ that field.
 %          } #endif
 %          $html .= '</SELECT>';
 %
+%        } elsif ( $def->{type} eq 'textarea' ) {
+%
+%          $html .=
+%            qq!<TEXTAREA NAME="${layer}__${field}">!. encode_entities($value).
+%            '</TEXTAREA>';
+%
 %        } elsif ( $def->{type} eq 'select-svc_pbx.html' ) {
 %
 %          $html .= include('/elements/select-svc_pbx.html',
+%                             'curr_value'   => $value,
 %                             'element_name' => "${layer}__${field}",
 %                             'element_etc'  => $disabled,
 %                             'multiple'     => ($flag eq 'S'),
@@ -305,6 +323,14 @@ that field.
 %          $html .= FS::svc_acct::radius_usergroup_selector(
 %            [ split(',', $value) ], "${layer}__${field}" );
 %
+%        } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
+%
+%          $html .= include('/elements/communigate_pro-accessmodes.html',
+%                             'element_name_prefix' => "${layer}__${field}_",
+%                             'curr_value'          => $value,
+%                             #doesn't work#'element_etc'  => $disabled,
+%                          );
+%
 %        } elsif ( $def->{type} eq 'disabled' ) {
 %
 %          $html .=