From: hickert Date: Wed, 3 Nov 2010 10:12:33 +0000 (+0000) Subject: Updated groupware shared folder class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c6b7ead07bc7e8194cf027c6087684f90ec97182;p=gosa.git Updated groupware shared folder class -Show folder editor directly, since we nothing else to mdoify in this template right now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20177 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc b/gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc index a82a9e637..4de0a56b8 100644 --- a/gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc +++ b/gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc @@ -196,30 +196,46 @@ class GroupwareSharedFolder extends plugin Folder editor ****************/ - if(isset($_POST['FolderWidget_cancel'])) $this->FolderWidget = NULL; - if(isset($_POST['FolderWidget_ok'])){ - $this->FolderWidget->save_object(); - $msgs = $this->FolderWidget->check(); - if(count($msgs)){ - msg_dialog::displayChecks($msgs); - }else{ - $this->folderList = $this->FolderWidget->save(); - $this->FolderWidget = NULL; - } - } - if(isset($_POST['configureFolder'])){ + + if(!$this->FolderWidget){ $this->FolderWidget = new FolderWidget($this->config,$this->folderList, $this->folderPrefix); $this->FolderWidget->setPermissions(GroupwareDefinitions::getPermissions()); $this->FolderWidget->acl_base = $this->acl_base; $this->FolderWidget->acl_category = $this->acl_category; + $this->FolderWidget->showButtons(FALSE); } - $this->dialog = FALSE; - if($this->FolderWidget instanceOf FolderWidget){ - $this->FolderWidget->save_object(); - $this->dialog = TRUE; - return($this->FolderWidget->execute()); - } - + $this->dialog = $this->FolderWidget->dialogOpened(); + $this->folderList = $this->FolderWidget->save(); + return($this->FolderWidget->execute()); + + +# ONCE WE HAVE MORE FEATURE THAN JUST THE FOLDER SETTINGS, +# ENABLE THIS AGAIN AN REMOVE THE ABOVE LINES. +# +# if(isset($_POST['FolderWidget_cancel'])) $this->FolderWidget = NULL; +# if(isset($_POST['FolderWidget_ok'])){ +# $this->FolderWidget->save_object(); +# $msgs = $this->FolderWidget->check(); +# if(count($msgs)){ +# msg_dialog::displayChecks($msgs); +# }else{ +# $this->folderList = $this->FolderWidget->save(); +# $this->FolderWidget = NULL; +# } +# } +# if(isset($_POST['configureFolder'])){ +# $this->FolderWidget = new FolderWidget($this->config,$this->folderList, $this->folderPrefix); +# $this->FolderWidget->setPermissions(GroupwareDefinitions::getPermissions()); +# $this->FolderWidget->acl_base = $this->acl_base; +# $this->FolderWidget->acl_category = $this->acl_category; +# } +# $this->dialog = FALSE; +# if($this->FolderWidget instanceOf FolderWidget){ +# $this->FolderWidget->save_object(); +# $this->dialog = TRUE; +# return($this->FolderWidget->execute()); +# } +# /**************** Generate HTML output @@ -249,6 +265,7 @@ class GroupwareSharedFolder extends plugin if(isset($_POST['GroupwareSharedFolder_posted'])){ plugin::save_object(); } + $this->FolderWidget->save_object(); } @@ -266,6 +283,7 @@ class GroupwareSharedFolder extends plugin */ function save() { + $this->folderList = $this->FolderWidget->save(); $rpc = $this->config->getRpcHandle(); // Walk through folders and perform requested actions @@ -347,6 +365,9 @@ class GroupwareSharedFolder extends plugin $this->orig_cn); } + // Merge Folder messages. + $messages = array_merge($messages,$this->FolderWidget->check()); + return($messages); }