Code

Disable type field, if there are cartrigdes assigned.
[gosa.git] / plugins / admin / departments / class_departmentManagement.inc
index 0575c45fedaa69335f0f783cf6b2f065f46a08ea..6e2fe7950c1b3124fbbaf307894c2daf7797d2de 100644 (file)
@@ -142,12 +142,9 @@ class departmentManagement extends plugin
                /* New Entry if Posted action (s_action) == new
                 */
                if ($s_action=="new"){
-                       $this->acl= array(":all");
                        $this->dn= "new";
-
                        $this->deptabs= new deptabs($this->config,
                                        $this->config->data['TABS']['DEPTABS'], $this->dn);
-                       $this->deptabs->set_acl($this->acl);
                }
 
                /* Edit Entry if Posted action (s_action) == edit 
@@ -197,7 +194,7 @@ class departmentManagement extends plugin
                if (isset($_POST['delete_department_confirm'])){
                        $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
                        $acl= get_module_permission($acl, "department", $this->dn);
-                       if (chkacl($acl, "all") == ""){
+                       if (chkacl($acl, "delete") == ""){
                                $this->remove_from_parent();
                                gosa_log ("Department object'".$this->dn."' has been removed");
                                $this->reload ();
@@ -283,7 +280,7 @@ class departmentManagement extends plugin
                                                " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
                                                " <input class='center' type='image' src='images/list_new_department.png' align='middle' alt='"._("Create new department")."' name='dep_new'>&nbsp;".
                                                " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-                                               _("Current base")."&nbsp;<select name='depselect' onChange='mainform.submit()'>$options</select>".
+                                               _("Base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
                                                " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
                                                "</div>";
 
@@ -291,8 +288,8 @@ class departmentManagement extends plugin
                        $divlist = new divlist("departmenttabs");
                        $divlist->SetSummary(_("This table displays all departments, in the selected tree."));
                        $divlist->SetEntriesPerPage(0);
-                       $actions= "<input type='image' src='images/edit.png'             alt='"._("edit")."'    name='dep_edit_%KEY%' title='"._("Edit this entry")."'>";
-                       $actions.= "<input type='image' src='images/edittrash.png' alt='"._("delete")."'        name='dep_del_%KEY%' title='"._("Delete this entry")."'>";
+                       $actions= "<input class='center' type='image' src='images/edit.png'              alt='"._("edit")."'    name='dep_edit_%KEY%' title='"._("Edit this entry")."'>";
+                       $actions.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'         name='dep_del_%KEY%' title='"._("Delete this entry")."'>";
 
                        $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";