X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_servDHCP.inc;h=be93e60c130683e94211a0ad66e487b7e657ee92;hb=14a1125842be8515bd8b8f7117081e00f40470b5;hp=4ab97ed61c85d677d45f5c42ce42deb4614971d1;hpb=b2063c6fb6bc26b78104ee1184309f70a6b1cd08;p=gosa.git diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 4ab97ed61..be93e60c1 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -2,39 +2,39 @@ class servdhcp extends plugin { - /* CLI vars */ - var $cli_summary= "Manage server basic objects"; - var $cli_description= "Some longer text\nfor help"; - var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); - /* attribute list for save action */ var $ignore_account= TRUE; var $attributes= array(); var $objectclasses= array("whatever"); - var $dialog ; - - function servdhcp ($config, $dn= NULL) + function servdhcp ($config, $dn= NULL, $parent= NULL) { - plugin::plugin ($config, $dn); - $this->dialog = new baseSelectDialog($config); + plugin::plugin ($config, $dn, $parent); } function execute() { + /* Call parent execute */ + plugin::execute(); + /* Fill templating stuff */ $smarty= get_smarty(); $display= ""; - $this->dialog->save_object(); - if($this->dialog->isSelected()){ - $base = $this->dialog->isSelected(); - } - if($this->dialog->isClosed()){ - echo "blub"; + /* Do we need to flip is_account state? */ + if (isset($_POST['modify_state'])){ + $this->is_account= !$this->is_account; + } + + /* Show tab dialog headers */ + if ($this->is_account){ + $display= $this->show_header(_("Remove DHCP service"), + _("This server has DHCP features enabled. You can disable them by clicking below.")); + } else { + $display= $this->show_header(_("Add DHCP service"), + _("This server has DHCP features disabled. You can enable them by clicking below.")); + return ($display); } - echo $base; - return($this->dialog->execute()); $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE)); return($display); @@ -56,8 +56,9 @@ class servdhcp extends plugin /* Check supplied data */ function check() { - $message= array(); - + /* Call common method to give check the hook */ + $message= plugin::check(); + return ($message); }