Code

'Enabled multiple edit for the manager attribute
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 13:48:34 +0000 (13:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 13:48:34 +0000 (13:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15695 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index b3ac780bf1c89ceefd4c147834b97404db938154..59d0eab4c74b9ca56db0b3daf6924e36269a03b5 100644 (file)
@@ -1744,6 +1744,9 @@ class user extends plugin
 
   function multiple_save_object()
   {
+
+    if(!isset($_POST['user_mulitple_edit'])) return;
+
     plugin::multiple_save_object();
 
     /* Get pw_storage mode */
@@ -1842,6 +1845,19 @@ class user extends plugin
       }
     }
 
+    // Detect the managers name
+    $this->manager_name = "";
+    $ldap = $this->config->get_ldap_link();
+    if(!empty($this->manager)){
+      $ldap->cat($this->manager, array('cn'));
+      if($ldap->count()){
+        $attrs = $ldap->fetch();
+        $this->manager_name = $attrs['cn'][0];
+      }else{
+        $this->manager_name = "("._("Unknown")."!): ".$this->manager;
+      }
+    }
+
     // Detect login restriction not used in all user objects.
     $this->gosaLoginRestriction_some = array();
     if(isset($all['gosaLoginRestriction'])){
index 41aeef2f1e4d14b64f7689d2bc0e4a0b3c669e04..517218efbd0434698a472201c50bcb64e8d353b6 100644 (file)
         {/if}
      </td>
     </tr>
+    {else}
+    <tr>
+     <td><label for="manager">{t}Manager{/t}</label></td>
+     <td>
+      <input type='checkbox' value="1" name="use_manager" id="use_manager" {if $use_manager} checked {/if}
+        onClick="document.mainform.submit();">
+        <input type='text' name='manager_name' id='manager_name' value='{$manager_name}' disabled
+          title='{$manager}'>
+        {if $use_manager}
+        <input type='image' src='images/lists/edit.png' name='editManager' class='center'>
+        {if $manager!=""}
+        <img src='images/info_small.png' title='{$manager}' class='center'>
+        <input type='image' src='images/lists/trash.png' name='removeManager' class='center'>
+        {/if}
+        {/if}
+     </td>
+    </tr>
+  
     {/if}
    </table>
   </td>