From 2d73473ce78c22160b618e93802a9551c9c77d69 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 7 Nov 2010 00:56:35 +0000 Subject: certificates ala communigate, RT#7515 --- httemplate/view/svc_cert.cgi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 httemplate/view/svc_cert.cgi (limited to 'httemplate/view/svc_cert.cgi') diff --git a/httemplate/view/svc_cert.cgi b/httemplate/view/svc_cert.cgi new file mode 100644 index 000000000..92902d6d2 --- /dev/null +++ b/httemplate/view/svc_cert.cgi @@ -0,0 +1,34 @@ +<% include('elements/svc_Common.html', + 'table' => 'svc_cert', + 'labels' => \%labels, + #'html_foot' => $html_foot, + 'fields' => \@fields, + ) +%> +<%init> + +my $fields = FS::svc_cert->table_info->{'fields'}; +my %labels = map { $_ => ( ref($fields->{$_}) + ? $fields->{$_}{'label'} + : $fields->{$_} + ); + } + keys %$fields; + +my @fields = ( + { field=>'privatekey', + value=> sub { + my $svc_cert = shift; + if ( $svc_cert->privatekey && $svc_cert->check_privatekey ) { + 'Verification OK'; + } elsif ( $svc_cert->privatekey ) { + 'Verification error'; + } else { + '(none)'; + } + }, + }, + qw( organization organization_unit city state country cert_contact ) +); + + -- cgit v1.2.1