summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16a6db0)
raw | patch | inline | side by side (parent: 16a6db0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Jan 2010 10:32:19 +0000 (10:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Jan 2010 10:32:19 +0000 (10:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15360 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 56a01d94c81ad58ecc6202f6ba29d237c035eb9f..9ad9f3b134520387b2a4e952daec3e27a3803533 100644 (file)
$smarty->assign("$attr", $this->$attr);
}
+ // Act on add user/grouo requests
if(isset($_POST['AddUser'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddUser",$this->member);
- }
- if(isset($_POST['AddGroup'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddGroup",$this->member);
+ $this->userSelect = new userGroupSelect($this->config, get_userinfo());
+ $this->dialog = TRUE;
}
if(isset($_POST['AddAdminUser'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminUser",$this->member);
- }
- if(isset($_POST['AddAdminGroup'])){
- $this->dialog = new selectUserToPrinterDialog($this->config, NULL,"AddAdminGroup",$this->member);
+ $this->adminUserSelect = new userGroupSelect($this->config, get_userinfo());
+ $this->dialog = TRUE;
}
/* Display ppd configure/select dialog */
}
/* Save selected users / groups */
- if(isset($_POST['PrinterSave'])){
- $this->dialog->save_object();
- if(count($this->dialog->check())){
- foreach($this->dialog->check() as $msg){
- msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
- }
- }else{
- $data= $new = $this->dialog->save();
- unset($data['type']);
- foreach($data as $mem){
- $this->AddMember($new['type'], $mem['dn']);
- }
- unset($this->dialog);
- $this->dialog=FALSE;
+ if(isset($_POST['userGroupSelect_save'])){
+
+ $users = array();
+ if($this->userSelect instanceOf userGroupSelect){
+ $users = $this->userSelect->save();
+ }elseif($this->adminUserSelect instanceOf userGroupSelect){
+ $users = $this->adminUserSelect->save();
+ }
+
+ foreach($users as $user){
+
+ print_a($user);
+# foreach($data as $mem){
+# $this->AddMember($new['type'], $mem['dn']);
+# }
}
+ $this->dialog=FALSE;
+ $this->userSelect = NULL;
+ $this->adminUserSelect = NULL;
+ }
+
+ if($this->userSelect instanceOf userGroupSelect){
+ return($this->userSelect->execute());
+ }elseif($this->adminUserSelect instanceOf userGroupSelect){
+ return($this->adminUserSelect->execute());
}
+
/* Display dialog, if there is currently one open*/
if(is_object($this->dialog)){
$this->dialog->save_object();