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
%
% my $columns = 3;
% my $count = 0;
+% my $communigate = 0;
% my @part_export =
% map { qsearch( 'part_export', {exporttype => $_ } ) }
% keys %{FS::part_export::export_info($layer)};
% $html .= '<BR><BR>'. table().
% "<TR><TH COLSPAN=$columns>Exports</TH></TR><TR>";
% foreach my $part_export ( @part_export ) {
+% $communigate++ if $part_export->exporttype =~ /^communigate/;
% $html .= '<TD><INPUT TYPE="checkbox"'.
% ' NAME="exportnum'. $part_export->exportnum. '" VALUE="1" ';
% $html .= 'CHECKED'
% && qsearchs( 'export_svc', {
% exportnum => $part_export->exportnum,
% svcpart => $clone || $part_svc->svcpart });
-% $html .= '>'. $part_export->exportnum. ': '. $part_export->exporttype.
-% ' to '. $part_export->machine. '</TD>';
+% $html .= '>'.$part_export->exportnum. ': ';
+% $html .= $part_export->exportname . '<DIV ALIGN="right"><FONT SIZE=-1>'
+% if ( $part_export->exportname );
+% $html .= $part_export->exporttype. ' to '. $part_export->machine;
+% $html .= '</FONT></DIV>' if ( $part_export->exportname );
+% $html .= '</TD>';
% $count++;
% $html .= '</TR><TR>' unless $count % $columns;
% }
% my $bgcolor;
%
% #yucky kludge
-% my @fields = defined( dbdef->table($layer) )
-% ? grep {
-% $_ ne 'svcnum' &&
-% ( !FS::part_svc->svc_table_fields($layer)
-% ->{$_}->{disable_part_svc_column} ||
-% $part_svc->part_svc_column($_)->columnflag
-% )
-% }
-% fields($layer)
-% : ();
+% my @fields = ();
+% if ( defined( dbdef->table($layer) ) ) {
+% @fields = grep {
+% $_ ne 'svcnum'
+% && ( $communigate || !$communigate_fields{$layer}->{$_} )
+% && ( !FS::part_svc->svc_table_fields($layer)
+% ->{$_}->{disable_part_svc_column}
+% || $part_svc->part_svc_column($_)->columnflag
+% )
+% } fields($layer);
+% }
% push @fields, 'usergroup' if $layer eq 'svc_acct'; #kludge
% $part_svc->svcpart($clone) if $clone; #haha, undone below
%
% (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>';
%
% 'multiple' => ($flag eq 'S'),
% );
%
+% } elsif ( $def->{type} eq 'select-lnp_status.html' ) {
+%
+% $html .= include('/elements/select-lnp_status.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
my $hashref = $part_svc->hashref;
# my $p_svcdb = $part_svc->svcdb || 'svc_acct';
-
+my %communigate_fields = (
+ 'svc_acct' => { map { $_=>1 }
+ qw( file_quota file_maxnum file_maxsize
+ password_selfchange password_recover
+ ),
+ grep /^cgp_/, fields('svc_acct')
+ },
+ 'svc_domain' => { map { $_=>1 }
+ qw( max_accounts trailer parent_svcnum ),
+ grep /^(cgp|acct_def)_/, fields('svc_domain')
+ },
+ #'svc_forward' => { map { $_=>1 } qw( ) },
+ #'svc_mailinglist' => { map { $_=>1 } qw( ) },
+ #'svc_cert' => { map { $_=>1 } qw( ) },
+);
</%init>