From: hickert Date: Wed, 27 Jan 2010 13:08:51 +0000 (+0000) Subject: Updated environment hotplug selection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=413262c1c15781b0cf4a56876e9291d2c3ad9723;p=gosa.git Updated environment hotplug selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15372 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc index b87b39071..49a15dbc5 100644 --- a/gosa-plugins/goto/personal/environment/class_environment.inc +++ b/gosa-plugins/goto/personal/environment/class_environment.inc @@ -821,41 +821,33 @@ class environment extends plugin foreach($this->gotoHotplugDevices as $plugs){ $tmp[] = $plugs['name']; } - $this->dialog = new hotplugDialog($this->config,$tmp); + $this->dialog = new hotplugSelect($this->config, get_userinfo()); $this->is_dialog = true; } /* Dialog Aborted */ - if(isset($_POST['HotPlugCancel'])){ - unset($this->dialog); + if(isset($_POST['hotplugSelect_cancel'])){ $this->dialog= FALSE; $this->is_dialog = false; } /* Dialod saved */ - if(isset($_POST['HotPlugSave'])){ + if(isset($_POST['hotplugSelect_save'])){ - $this->dialog->save_object(); - if(count($this->dialog->check())!=0){ - foreach($this->dialog->check() as $msg){ - msg_dialog::display(_("Error"), $msg, ERROR_DIALOG); - } - }else{ - $this->dialog->save_object(); - $a_tmp = $this->dialog->save(); - - if(is_array($a_tmp)){ - foreach($a_tmp as $name => $hotplug){ - if($this->multiple_support_active){ - $hotplug['UsedByAllUsers'] = TRUE; - } - $this->gotoHotplugDevices[$name]= $hotplug; - } + $res = $this->dialog->save(); + foreach($res as $hotplug){ + $name = $hotplug['cn'][0]; + if($this->multiple_support_active){ + $hotplug['UsedByAllUsers'] = TRUE; } - unset($this->dialog); - $this->dialog= FALSE; - $this->is_dialog = false; + $this->gotoHotplugDevices[$name]= $hotplug; } + $this->dialog= FALSE; + $this->is_dialog = false; + } + + if($this->dialog instanceOf hotplugSelect){ + return($this->dialog->execute()); } if($this->multiple_support_active){ diff --git a/gosa-plugins/goto/personal/environment/hotplugSelect/selectHotplug-list.xml b/gosa-plugins/goto/personal/environment/hotplugSelect/selectHotplug-list.xml index 080ea4bd8..1241d5a9f 100644 --- a/gosa-plugins/goto/personal/environment/hotplugSelect/selectHotplug-list.xml +++ b/gosa-plugins/goto/personal/environment/hotplugSelect/selectHotplug-list.xml @@ -20,9 +20,6 @@ - - - |20px;c|||