Code

Added password method description to user dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 11:58:29 +0000 (11:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 11:58:29 +0000 (11:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10790 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc
gosa-core/plugins/personal/generic/generic.tpl

index f32f662f9acd0e8c8fcdfbb921b4745929523efb..1c2cc61f54fd6a17dc930d525043854b9d3efc08 100644 (file)
@@ -591,7 +591,18 @@ class user extends plugin
     }else{
       new msg_dialog(_("Password method"),_("The selected password method is no longer available."),WARNING_DIALOG);
     }
-    
+
+
+    /* Create password methods array */
+    $pwd_methods = array();
+    foreach($hashes as $id => $name){
+      if(!empty($temp['desc'][$id])){
+        $pwd_methods[$name] = $name." (".$temp['desc'][$id].")";
+      }else{
+        $pwd_methods[$name] = $name;
+      }
+    }
     /* Load attributes and acl's */
     $ui =get_userinfo();
     foreach($this->attributes as $val){
@@ -616,7 +627,7 @@ class user extends plugin
       $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit'))));
     }
 
-    $smarty->assign("pwmode", $hashes);
+    $smarty->assign("pwmode", $pwd_methods);
     $smarty->assign("pwmode_select", $this->pw_storage);
     $smarty->assign("pw_configurable", $is_configurable);
     $smarty->assign("passwordStorageACL", $this->getacl("userPassword",(!is_object($this->parent) && !session::is_set('edit'))));
index 7636a9c58ffd969d839ed8b7e20ea54f58f66356..c3bd485043c132baf6fe26545b5604679f3f0e2c 100644 (file)
      <td>
 {render acl=$passwordStorageACL checkbox=$multiple_support checked=$use_pw_storage}
              <select size="1" id="pw_storage" name="pw_storage" onchange='document.mainform.submit()'>
-              {html_options values=$pwmode output=$pwmode selected=$pwmode_select}
+                       {foreach from=$pwmode key=value item=desc}
+                               <option value="{$value}" {if $pwmode_select == $value}selected{/if} >{$desc}</option>
+                       {/foreach}
              </select>
        {if $pw_configurable eq "true"}
              &nbsp; <input id="edit_pw_method" type="submit" name="edit_pw_method" value="{t}Configure{/t}...">