Code

update for certfificate informations
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Jun 2005 09:19:54 +0000 (09:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Jun 2005 09:19:54 +0000 (09:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@612 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc
plugins/personal/generic/generic_certs.tpl

index c0f6b8611bb665eb4a44b01c06c183a7afc5f300..afa0383aa4357b6c8238c7e42332fa5f0e288b29 100644 (file)
@@ -384,7 +384,6 @@ class user extends plugin
     if ($this->cert_dialog){
       foreach(array("userCertificate", "userSMIMECertificate", "userPKCS12") as $cert){
         if ($this->$cert != ""){
-          $smarty->assign("$cert"."_state", _("present"));
           /* import certificate */
           $certificate = new certificate;
           $certificate->import($this->$cert);
@@ -392,11 +391,12 @@ class user extends plugin
           /* Read out data*/
           $timeto   = ($certificate->getvalidto_date());
           $timefrom = ($certificate->getvalidfrom_date());
-          $str = _("This Certificate is valid till ").date('d M Y',$timeto)." - ".str_replace("/"," , ",$certificate->getCN());
+          $str = $certificate->getname()."<br>".
+                  _("Valid from")." ".date('d M Y',$timefrom)." "._("to")." ".date('d M Y',$timeto)." - "._("Serialnumber")." : ".$certificate->getSerialNumber()."<br>".
+                  _("This certificate is")." <b>".$certificate->isvalid(true)."</b>";
           $smarty->assign($cert."info",$str);
         } else {
-          $smarty->assign($cert."info","");
-          $smarty->assign("$cert"."_state", _("absent"));
+          $smarty->assign($cert."info",_("No certificate present"));
         }
       }
       $smarty->assign("governmentmode", "false");
index f8d7e23425913f31aca64873e6d72afbbfb03e7a..bd53f288593912ed7a640519ce92050ec2105a6f 100644 (file)
@@ -9,7 +9,7 @@
  </tr>
  <tr>
    <td width="250">
-      {t}Standard certificate{/t} (<i>{$userCertificate_state}</i>)
+      {t}Standard certificate{/t}
    </td>
    <td>
      <input name="userCertificate_file" type="file" size="20" maxlength="255" accept="text/*.*">
@@ -35,7 +35,7 @@
  <table style="vertical-align:top; text-align:left;border-top: 1px solid rgb(176,176,176);" width="100%" cellpadding=4 border=0>
  <tr>
    <td width="250">
-      {t}S/MIME certificate{/t} (<i>{$userSMIMECertificate_state}</i>)
+      {t}S/MIME certificate{/t} 
    </td>
    <td >
      <input name="userSMIMECertificate_file" type="file" size="20" maxlength="255" accept="text/*.*">
@@ -58,7 +58,7 @@
 <table style="vertical-align:top; text-align:left;border-top: 1px solid rgb(176,176,176);" width="100%" cellpadding=4 border=0> 
  <tr>
    <td width="250">
-      {t}PKCS12 certificate{/t} (<i>{$userPKCS12_state}</i>)
+      {t}PKCS12 certificate{/t} 
    </td>
    <td>
      <input name="userPKCS12_file" type="file" size="20" maxlength="255" accept="text/*.*">