[freeside-commits] freeside/httemplate/view svc_cert.cgi,1.4,1.5

Ivan,,, ivan at wavetail.420.am
Sun Nov 7 23:36:01 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv1456/httemplate/view

Modified Files:
	svc_cert.cgi 
Log Message:
certificates ala communigate, RT#7515

Index: svc_cert.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_cert.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- svc_cert.cgi	8 Nov 2010 00:01:58 -0000	1.4
+++ svc_cert.cgi	8 Nov 2010 07:35:59 -0000	1.5
@@ -33,9 +33,31 @@
   { 'field'=>'csr',
     'value'=> sub {
       my $svc_cert = shift;
-      if ( $svc_cert->csr ) { #display the subject etc?
-        '<PRE><FONT STYLE="font-family:monospace">'. "\n". $svc_cert->csr.
+      if ( $svc_cert->csr ) {
+
+        my $out = '';
+
+        my %hash = $svc_cert->check_csr;
+
+        $out .= include('/elements/table-grid.html'). #'<TABLE>'.
+                '<TR><TH COLSPAN=2 BGCOLOR="#cccccc" ALIGN="center">'.
+                'Requested by</TH></TR>';
+
+        my $col = $svc_cert->subj_col;
+
+        foreach my $key (keys %hash) {
+          $out .= "<TR><TD>". $labels{$col->{$key}}.  "</TD>".
+                      "<TD>". $hash{$key}. "</TD></TR>";
+        }
+
+        $out .= '</TABLE>';
+
+        $out .= 
+          '<PRE><FONT STYLE="font-family:monospace">'. $svc_cert->csr.
         '</FONT></PRE>';
+
+        $out;
+
       } elsif ( $svc_cert->common_name ) {
         my $svcnum = $svc_cert->svcnum;
         qq(<A HREF="${p}misc/svc_cert-generate.html?action=generate_csr;svcnum=$svcnum">Generate</A>);



More information about the freeside-commits mailing list