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
+ <LI>svc_pbx - Customer PBXs
<LI>svc_external - Externally-tracked service
<!-- <LI>svc_charge - One-time charges (Partially unimplemented)
<LI>svc_wo - Work orders (Partially unimplemented)
% '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,
% },
%
% 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 );
% '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!;
% } #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'),
+% );
+%
% } elsif ( $def->{type} eq 'radius_usergroup_selector' ) {
%
% #XXX disable the RADIUS usergroup selector? ugh it sure does need
% $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 .=
%
% } else {
%
-% $html .= '<font color="#ff0000">unknown type'. $def->{type};
+% $html .= '<font color="#ff0000">unknown type '. $def->{type};
%
% }
%