summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2010-11-08 05:24:06 +0000
committerivan <ivan>2010-11-08 05:24:06 +0000
commit246e76618447bb7ac436e9bfb8c0b042f9613326 (patch)
treec30cec1518231df96a3e45ba0a4eece200ecb0e5
parente50b6ec8d63afe4c04ae33384758d8786fcc7cfe (diff)
certificates ala communigate, RT#7515
-rw-r--r--FS/FS/Schema.pm1
-rw-r--r--FS/FS/part_export/communigate_pro.pm4
-rw-r--r--FS/FS/svc_CGP_Mixin.pm18
-rw-r--r--FS/FS/svc_domain.pm7
-rw-r--r--httemplate/edit/svc_domain/communigate-basics.html18
-rw-r--r--httemplate/view/svc_domain/basics.html7
6 files changed, 55 insertions, 0 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 4c85da1..b8ba5b2 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1775,6 +1775,7 @@ sub tables_hashref {
'trailer', 'text', 'NULL', '', '', '',
'cgp_aliases', 'varchar', 'NULL', 255, '', '',
'cgp_accessmodes','varchar','NULL', 255, '', '', #DomainAccessModes
+ 'cgp_certificatetype','varchar','NULL', $char_d, '', '',
#settings
'acct_def_password_selfchange', 'char', 'NULL', 1, '', '',
'acct_def_password_recover', 'char', 'NULL', 1, 'Y', '',
diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm
index cc96086..a3ec5e0 100644
--- a/FS/FS/part_export/communigate_pro.pm
+++ b/FS/FS/part_export/communigate_pro.pm
@@ -173,6 +173,8 @@ sub _export_insert_svc_domain {
if $svc_domain->parent_svcnum;
$settings{'TrailerText'} = $svc_domain->trailer
if $svc_domain->trailer;
+ $settings{'CertificateType'} = $svc_domain->cgp_certificatetype
+ if $svc_domain->cgp_certificatetype;
my @options = ( $create, $svc_domain->domain, \%settings );
@@ -426,6 +428,8 @@ sub _export_replace_svc_domain {
$settings{'AdminDomainName'} =
$new->parent_svcnum ? $new->parent_svc_x->domain : ''
if $old->parent_svcnum != $new->parent_svcnum;
+ $settings{'CertificateType'} = $new->cgp_certificatetype
+ if $old->cgp_certificatetype ne $new->cgp_certificatetype;
if ( keys %settings ) {
my $error = $self->communigate_pro_queue( $new->svcnum,
diff --git a/FS/FS/svc_CGP_Mixin.pm b/FS/FS/svc_CGP_Mixin.pm
index 489e979..2eee37a 100644
--- a/FS/FS/svc_CGP_Mixin.pm
+++ b/FS/FS/svc_CGP_Mixin.pm
@@ -131,6 +131,24 @@ sub cgp_emptytrash_values {
];
}
+=item cgp_certificatetype_values
+
+Returns an arrayref of possible CertificateType values.
+
+=cut
+
+#http://www.communigate.com/cgatepro/PKI.html
+
+sub cgp_certificatetype_values {
+
+ [ '', #<option value="-1">default(Test)
+ 'Enabled',
+ 'Disabled',
+ 'Test',
+ ];
+
+}
+
=back
=head1 BUGS
diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm
index dde6d3c..a97f35b 100644
--- a/FS/FS/svc_domain.pm
+++ b/FS/FS/svc_domain.pm
@@ -133,6 +133,13 @@ sub table_info {
disable_inventory => 1,
disable_select => 1,
},
+ 'cgp_certificatetype' => {
+ label => 'Communigate PKI services',
+ type => 'select',
+ select_list => __PACKAGE__->cgp_certificatetype_values,
+ disable_inventory => 1,
+ disable_select => 1,
+ },
'acct_def_cgp_accessmodes' => {
label => 'Acct. default Communigate enabled services',
diff --git a/httemplate/edit/svc_domain/communigate-basics.html b/httemplate/edit/svc_domain/communigate-basics.html
index ff401c0..dbad35f 100644
--- a/httemplate/edit/svc_domain/communigate-basics.html
+++ b/httemplate/edit/svc_domain/communigate-basics.html
@@ -56,6 +56,24 @@
% }
% if ( $communigate
+% && $part_svc->part_svc_column('cgp_certificatetype')->columnflag ne 'F' )
+% {
+
+ <% include('/elements/tr-select.html',
+ 'label' => 'PKI services',
+ 'field' => 'cgp_certificatetype',
+ 'options' => $svc_domain->cgp_certificatetype_values,
+ 'labels' => {
+ '' => 'default (Test)',
+ },
+ 'curr_value' => $svc_domain->cgp_certificatetype,
+ )
+ %>
+% } else {
+ <INPUT TYPE="hidden" NAME="cgp_certificatetype" VALUE="<% $svc_domain->cgp_certificatetype() |h %>">
+% }
+
+% if ( $communigate
% && $part_svc->part_svc_column('trailer')->columnflag ne 'F' )
% {
diff --git a/httemplate/view/svc_domain/basics.html b/httemplate/view/svc_domain/basics.html
index 1915719..71b7ca4 100644
--- a/httemplate/view/svc_domain/basics.html
+++ b/httemplate/view/svc_domain/basics.html
@@ -86,6 +86,13 @@ Service #<B><% $svcnum %></B>
</TR>
% }
+% if ( $svc_domain->cgp_certificatetype ) {
+ <TR>
+ <TD ALIGN="right">PKI services</TD>
+ <TD BGCOLOR="#ffffff"><% $svc_domain->cgp_certificatetype %></TD>
+ </TR>
+% }
+
% if ( $svc_domain->trailer ) {
<TR>
<TD ALIGN="right">Mail trailer</TD>