Code

Updated Samba tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jan 2009 13:41:14 +0000 (13:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jan 2009 13:41:14 +0000 (13:41 +0000)
-Fixed password info

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13349 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/personal/samba/class_sambaAccount.inc
gosa-plugins/samba/personal/samba/samba3.tpl

index 83cfce3127b50000cddbe339908d9eb4ebe0df26..56ebe58d98591676a222dab6e1e2cb6f31e45ff4 100644 (file)
@@ -694,13 +694,11 @@ class sambaAccount extends plugin
     /* Create additional info for sambaKickOffTime and sambaPwdMustChange. 
        e.g. Display effective kickoff time. Domain policy + user settings. 
      */
-    $additional_info_KickoffTime = "";
     $additional_info_PwdMustChange = "";
 
     /* Calculate effective max Password Age 
         This can only be calculated if sambaPwdLastSet ist set. 
      */
-    $this->attrs['sambaPwdLastSet'][0] = time() - (60 *60);
     if(isset($this->attrs['sambaPwdLastSet'][0])){
       $last = $this->attrs['sambaPwdLastSet'][0];
 
@@ -711,23 +709,19 @@ class sambaAccount extends plugin
         /* A negative value means the password is outdated 
          */
         if($d < 0){
-          $additional_info_PwdMustChange = sprintf(_("Invalid by domain policiy, since %s."),
+          $additional_info_PwdMustChange = sprintf(_("The password is outdated since %s, by domain policy."),
               date("d.m.Y H:i:s",$last + $sid['sambaMaxPwdAge'][0]));
         }else{
           if($this->password_expires && ($last + $sid['sambaMaxPwdAge'][0]) > $this->sambaPwdMustChange){
-            $additional_info_PwdMustChange = sprintf(_("Invalid by user policiy, on %s."),
+            $additional_info_PwdMustChange = sprintf(_("The password is valid till %s, by user policy."),
                 date("d.m.Y H:i:s",  $this->sambaPwdMustChange));
           }else{
-             $additional_info_PwdMustChange = sprintf(_("Invalid by domain policiy, on %s."),
+             $additional_info_PwdMustChange = sprintf(_("The password is valid till %s, by domain policy."),
                 date("d.m.Y H:i:s",  ($last + $sid['sambaMaxPwdAge'][0])));
           }
         }
       }
     }
-    
-    $additional_info_KickoffTime = "asdf";
-
-    $smarty->assign("additional_info_KickoffTime",$additional_info_KickoffTime);
     $smarty->assign("additional_info_PwdMustChange",$additional_info_PwdMustChange);
 
     /* Show main page */
index c58cdbc11fc6920f396202bc198124f96025f1ca..9e158dd90d2c24184306a5de90c4ab5e3fa5c27b 100644 (file)
        {html_options values=$years output=$years selected=$year}
       </select>
       {/render}
-         <br>{$additional_info_PwdMustChange}
      </td>
     </tr>
+       {if $additional_info_PwdMustChange}
+    <tr>
+     <td colspan=2 style='padding-left: 10px;'>
+         <i>({$additional_info_PwdMustChange})</i>
+     </td>
+    </tr>
+       {/if}
     <tr>
      <td>
       {render acl=$sambaKickoffTimeACL  checkbox=$multiple_support checked=$use_kickoff_time_set}
       <input type="hidden" name="sambaPwdMustChange" value="{$sambaPwdMustChange}">
       <input type="hidden" name="sambaPwdCanChange" value="{$sambaPwdMustChange}">
       <input type="hidden" name="sambaKickoffTime" value="{$sambaKickoffTime}">
-         <br>{$additional_info_KickoffTime}
      </td>
     </tr>
     <tr>