summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfecfa3)
raw | patch | inline | side by side (parent: dfecfa3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Oct 2008 13:26:50 +0000 (13:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Oct 2008 13:26:50 +0000 (13:26 +0000) |
-Added gotoLpdEnable Dialog. Not finished yet
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12610 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12610 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl | [new file with mode: 0644] | patch | blob |
gosa-plugins/goto/admin/systems/goto/workstationService.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+
+class gotoLpdEnable extends plugin
+{
+ public $parent;
+
+ protected $device = "";
+ protected $port = "";
+ protected $options = "";
+ protected $writeonly= FALSE;
+
+ public $attributes = array("device","port","options","writeonly");
+
+ public function __construct($config,$data,&$parent)
+ {
+ plugin::plugin($config,NULL);
+
+ $this->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 1e4e348b657ac4ce6041c4f74ae6f115da775c37..d350b2e2aa85675e059f4062488107339f0f6d28 100644 (file)
class workservice extends plugin
{
var $gotoScannerEnable;
+ var $gotoLpdEnable;
+
/* Generic terminal attributes */
var $gotoXMonitor= "";
var $gotoXDriver= "";
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");
function execute()
{
- $this->send_goto_reload();
-
/* Call parent execute */
plugin::execute();
}
}
+ /**********
+ 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();
"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
--- /dev/null
@@ -0,0 +1,62 @@
+
+<table style='width:100%;'>
+ <tr>
+ <td style='width:50%;'>
+ <table>
+ <tr>
+ <td>{t}Device{/t}</td>
+ <td>
+ <select name='device'>
+ {html_options options=$devices selected=$device}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Port{/t}</td>
+ <td>
+ <input type='text' name='port' value='{$port}'>
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Options{/t}</td>
+ <td>
+ <input type='text' value='{$options}' name='options'>
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Write only{/t}</td>
+ <td>
+ <input type='checkbox' name='writeonly' value='1' >
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table>
+ <tr>
+ <td>{t}Speed{/t}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{t}Flow control{/t}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{t}Parity{/t}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{t}Bits{/t}</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<p class='seperator'>
+</p>
+<div style='width:100%; text-align: right; padding:5px;'>
+ <input type='submit' name='gotoLpdEnable_Ok' value='{msgPool type=okButton}'>
+ <input type='submit' name='gotoLpdEnable_Close' value='{msgPool type=cancelButton}'>
+</div>
diff --git a/gosa-plugins/goto/admin/systems/goto/workstationService.tpl b/gosa-plugins/goto/admin/systems/goto/workstationService.tpl
index 1016af92678d263b0c8a5d8149b3d8fdf8ff2779..4314be0682042ee4daeb03150f413c85738168fb 100644 (file)
{t}Provide scan services{/t}
<br>
+ <br>
+ <h2><img class="center" alt="" src="plugins/systems/images/select_printer.png"> {t}Printer{/t}</h2>
+
+{render acl=$gotoLpdEnableACL}
+ <input type='submit' name='gotoLpdEnable' value='{msgPool type=editButton}'>
+{/render}
</td>
</tr>
</table>