From: ivan Date: Mon, 19 Apr 2010 01:27:00 +0000 (+0000) Subject: communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText... X-Git-Tag: root_of_svc_elec_features~305 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ad7f49821d40ffd099a45acc32ba91e0e211aede communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText, RT#7514 --- diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 2850d4f13..082a03d36 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1715,6 +1715,7 @@ sub tables_hashref { 'expiration_date', @date_type, '', '', #communigate pro fields (quota = MaxAccountSize) 'max_accounts', 'int', 'NULL', '', '', '', + 'trailer', 'text', 'NULL', '', '', '', 'cgp_aliases', 'varchar', 'NULL', 255, '', '', 'cgp_accessmodes','varchar','NULL', 255, '', '', #DomainAccessModes 'acct_def_password_selfchange','char', 'NULL', 1, '', '', diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index 7f5cece59..37cc6ef26 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -141,6 +141,8 @@ sub _export_insert_svc_domain { if $svc_domain->max_accounts; $settings{'AdminDomainName'} = $svc_domain->parent_svc_x->domain if $svc_domain->parent_svcnum; + $settings{'TrailerText'} = $svc_domain->trailer + if $svc_domain->trailer; my @options = ( $create, $svc_domain->domain, \%settings ); @@ -325,6 +327,8 @@ sub _export_replace_svc_domain { my %settings = (); $settings{'AccountsLimit'} = $new->max_accounts if $old->max_accounts ne $new->max_accounts; + $settings{'TrailerText'} = $new->trailer + if $old->trailer ne $new->trailer; $settings{'DomainAccessModes'} = $new->cgp_accessmodes if $old->cgp_accessmodes ne $new->cgp_accessmodes; $settings{'AdminDomainName'} = @@ -865,6 +869,7 @@ sub communigate_pro_command { #subroutine, not method my( $machine, $port, $login, $password, $method, @args ) = @_; eval "use CGP::CLI"; + die $@ if $@; my $cli = new CGP::CLI( { 'PeerAddr' => $machine, diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index d6eaf2579..5adbef53e 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -419,6 +419,7 @@ sub check { my $error = $self->ut_numbern('svcnum') || $self->ut_numbern('catchall') || $self->ut_numbern('max_accounts') + || $self->ut_anything('trailer') #well || $self->ut_textn('cgp_aliases') #well || $self->ut_enum('acct_def_password_selfchange', [ '', 'Y' ]) || $self->ut_enum('acct_def_password_recover', [ '', 'Y' ]) diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index c85dd3b72..8b4f282a6 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -55,7 +55,7 @@ Available top-level domains: <% $export->option('tlds') %> % } % if ( $communigate -% && $part_svc->part_svc_column('max_accounts')->columnflag !~ /^[FA]$/ ) { +% && $part_svc->part_svc_column('cgp_aliases')->columnflag !~ /^[FA]$/ ) { Aliases @@ -95,6 +95,22 @@ Available top-level domains: <% $export->option('tlds') %> % } +% if ( $communigate +% && $part_svc->part_svc_column('trailer')->columnflag ne 'F' ) +% { + + + Mail trailer + + + + + +% } else { + +% } + +
diff --git a/httemplate/view/svc_domain/basics.html b/httemplate/view/svc_domain/basics.html index db4fac150..c9841f49c 100644 --- a/httemplate/view/svc_domain/basics.html +++ b/httemplate/view/svc_domain/basics.html @@ -84,6 +84,13 @@ Service #<% $svcnum %> <% $svc_domain->cgp_accessmodes %> +% if ( $svc_domain->trailer ) { + + Mail trailer +
<% $svc_domain->trailer |h %>
+ +% } + <%init>