X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_cert.cgi;h=964b808ab4b23c0314e9b36502227700b51b2287;hb=2ffdb485e5534df3d89bcc12d4d02d485e9b28f5;hp=48494d2d20ecf6d3e637de3843b91b4ae838e389;hpb=e50b6ec8d63afe4c04ae33384758d8786fcc7cfe;p=freeside.git diff --git a/httemplate/view/svc_cert.cgi b/httemplate/view/svc_cert.cgi index 48494d2d2..964b808ab 100644 --- a/httemplate/view/svc_cert.cgi +++ b/httemplate/view/svc_cert.cgi @@ -17,7 +17,7 @@ my %labels = map { $_ => ( ref($fields->{$_}) my @fields = ( { field=>'privatekey', - value=> sub { + value_callback=> sub { my $svc_cert = shift; if ( $svc_cert->privatekey && $svc_cert->check_privatekey ) { 'Verification OK'; @@ -31,11 +31,33 @@ my @fields = ( qw( common_name organization organization_unit city state country cert_contact ), { 'field'=>'csr', - 'value'=> sub { + 'value_callback'=> sub { my $svc_cert = shift; - if ( $svc_cert->csr ) { #display the subject etc? - '
'. "\n". $svc_cert->csr.
-        '
'; + if ( $svc_cert->csr ) { + + my $out = ''; + + my %hash = $svc_cert->check_csr; + + $out .= include('/elements/table-grid.html'). #''. + ''; + + my $col = $svc_cert->subj_col; + + foreach my $key (keys %hash) { + $out .= "". + ""; + } + + $out .= '
'. + 'Requested by
". $labels{$col->{$key}}. "". $hash{$key}. "
'; + + $out .= + '
'. $svc_cert->csr.
+          '
'; + + $out; + } elsif ( $svc_cert->common_name ) { my $svcnum = $svc_cert->svcnum; qq(Generate); @@ -45,7 +67,7 @@ my @fields = ( }, }, { 'field'=>'certificate', - 'value'=> sub { + 'value_callback'=> sub { my $svc_cert = shift; if ( $svc_cert->certificate ) { @@ -115,7 +137,7 @@ my @fields = ( }, }, { 'field'=>'cacert', - 'value'=> sub { + 'value_callback'=> sub { my $svc_cert = shift; if ( $svc_cert->cacert ) {