From 5013833d4dec927207601631dc9773a0342debe8 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 28 Mar 2008 14:14:53 +0000 Subject: [PATCH] Unified with the printer dialog... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/environment/class_hotplugDialog.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc b/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc index 50e571941..6ff644914 100644 --- a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc +++ b/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc @@ -56,15 +56,23 @@ class hotplugDialog extends plugin return($display); } + function check(){ + /* Call common method to give check the hook */ + $message= plugin::check(); + + if(empty($_POST['hostplugName'])){ + $message[] = _("Please select a hotplug device!"); + } + return $message; + } + /* Save to LDAP */ function save() { $entries = array(); - if (isset($_POST['hotplugName'])){ - foreach($_POST['hotplugName'] as $name){ - $entries[$name] = $this->hotplugDeviceList[$name]; - } + foreach($_POST['hotplugName'] as $name){ + $entries[$name] = $this->hotplugDeviceList[$name]; } return $entries; -- 2.30.2