From 04e32f10a68793668a2a76e07a2ea3323a5115c0 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 6 Oct 2008 13:26:50 +0000 Subject: [PATCH] Updated Workstation service -Added gotoLpdEnable Dialog. Not finished yet git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12610 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_gotoLpdEnabled.inc | 57 +++++++++++++++++ .../systems/goto/class_workstationService.inc | 30 ++++++++- .../goto/admin/systems/goto/gotoLpdEnable.tpl | 62 +++++++++++++++++++ .../admin/systems/goto/workstationService.tpl | 6 ++ 4 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc create mode 100644 gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl diff --git a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc new file mode 100644 index 000000000..6f83bda3a --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc @@ -0,0 +1,57 @@ +parent = $parent; + } + + public function execute() + { + $smarty = get_smarty(); + + $smarty->assign("devices",array( + "USB" => _("USB"), + "PARALLEL" => _("Parallel"), + "SERIAL" => _("Serial"))); + + foreach($this->attributes as $attr){ + $smarty->assign($attr,$this->$attr); + } + foreach(array("devices","ports") as $attr){ + $smarty->assign($attr,array()); + } + + return($smarty->fetch(get_template_path("gotoLpdEnable.tpl",TRUE,dirname(__FILE__)))); + } + + public function save_object() + { + plugin::save_object(); + } + + + /* Allow every action, check are made in class service not here. + */ + public function acl_is_writeable($attr,$skip_write = FALSE) + { + return(TRUE); + } +} + + + +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index 1e4e348b6..d350b2e2a 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -3,6 +3,8 @@ class workservice extends plugin { var $gotoScannerEnable; + var $gotoLpdEnable; + /* Generic terminal attributes */ var $gotoXMonitor= ""; var $gotoXDriver= ""; @@ -38,7 +40,7 @@ class workservice extends plugin var $attributes= array("gotoXMonitor", "gotoXDriver", "gotoXResolution", "gotoXColordepth", "gotoXHsync", "gotoXVsync", - "gotoScannerEnable", "gotoScannerClients", + "gotoScannerEnable","gotoLpdEnable", "gotoScannerClients", "gotoScannerBackend", "gotoXKbModel", "gotoXKbLayout", "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport", "goFonHardware"); var $objectclasses= array("GOhard"); @@ -229,8 +231,6 @@ class workservice extends plugin function execute() { - $this->send_goto_reload(); - /* Call parent execute */ plugin::execute(); @@ -253,6 +253,29 @@ class workservice extends plugin } } + /********** + gotoLpdEnable + **********/ + + if(isset($_POST['gotoLpdEnable_Close'])){ + $this->dialog = NULL; + } + + if(isset($_POST['gotoLpdEnable'])){ + $this->dialog = new gotoLpdEnable($this->config,$this->gotoLpdEnable,$this); + } + + if($this->dialog instanceof plugin){ + $this->dialog->save_object(); + return($this->dialog->execute()); + } + + + /********** + Ende: gotoLpdEnable + **********/ + + /* Show main page */ $smarty= get_smarty(); @@ -495,6 +518,7 @@ class workservice extends plugin "gotoXVsync" => _("VSync"), "AutoSync" => _("Use DDC"), "gotoScannerEnable" => _("Scanner enabled"), + "gotoLpdEnable" => _("Printer enabled"), "gotoXKbModel" => _("Keyboard model"), "gotoXKbLayout" => _("Keyboard layout"), "gotoXKbVariant" => _("Keyboard variant"), diff --git a/gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl b/gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl new file mode 100644 index 000000000..c6972b0ed --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl @@ -0,0 +1,62 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + +
{t}Device{/t} + +
{t}Port{/t} + +
{t}Options{/t} + +
{t}Write only{/t} + +
+
+ + + + + + + + + + + + + + + + + +
{t}Speed{/t}
{t}Flow control{/t}
{t}Parity{/t}
{t}Bits{/t}
+
+ +

+

+
+   + +
diff --git a/gosa-plugins/goto/admin/systems/goto/workstationService.tpl b/gosa-plugins/goto/admin/systems/goto/workstationService.tpl index 1016af926..4314be068 100644 --- a/gosa-plugins/goto/admin/systems/goto/workstationService.tpl +++ b/gosa-plugins/goto/admin/systems/goto/workstationService.tpl @@ -206,6 +206,12 @@ {t}Provide scan services{/t}
+
+

{t}Printer{/t}

+ +{render acl=$gotoLpdEnableACL} + +{/render} -- 2.30.2