diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 7ba6be5e186e0a50b2220c793c5cfc1c11af48d8..a12ac099244755167392beb14dd4f5e2062d83a7 100644 (file)
class workservice extends plugin
{
class workservice extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage terminal service aspects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
var $gotoScannerEnable;
/* Generic terminal attributes */
var $gotoXMonitor= "";
var $gotoScannerEnable;
/* Generic terminal attributes */
var $gotoXMonitor= "";
var $XKbLayouts =array();
var $XKbVariants =array();
var $XKbLayouts =array();
var $XKbVariants =array();
- function workservice ($config, $dn= NULL)
+ var $member_of_ogroup = FALSE;
+
+ function workservice ($config, $dn= NULL, $parent= NULL)
{
{
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, $dn, $parent);
+
+ if(!isset($this->parent->by_object['ogroup'])){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd ($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn"));
+ $this->member_of_ogroup = $ldap->count() >= 1;
+ }
$this->XResolutions= array(
"640x480" => "640x480",
$this->XResolutions= array(
"640x480" => "640x480",
"/dev/ttyS1" => "/dev/ttyS1", "/dev/psaux" =>"/dev/psaux",
"/dev/input/mice" => "/dev/input/mice");
"/dev/ttyS1" => "/dev/ttyS1", "/dev/psaux" =>"/dev/psaux",
"/dev/input/mice" => "/dev/input/mice");
- /* Additional values will be extracted from /etc/gosa/keyboardLayouts */
+ /* Additional values will be extracted from CONFIG_DIR/gosa/keyboardLayouts */
$this->XKbLayouts= array ("de"=> "de","intl" =>"intl","us" =>"us");
$this->XKbLayouts= array ("de"=> "de","intl" =>"intl","us" =>"us");
- $this->XKbVariants= array ("nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
+ $this->XKbVariants= array ("basic"=>"basic", "nodeadkeys"=>"nodeadkeys");
/* try to read additional keyboard layouts
*/
/* try to read additional keyboard layouts
*/
$smarty->assign("hiddenState","");
}
$smarty->assign("hiddenState","");
}
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
+
/* Show main page */
return($smarty->fetch (get_template_path('workstationService.tpl',TRUE,dirname(__FILE__))));
}
/* Show main page */
return($smarty->fetch (get_template_path('workstationService.tpl',TRUE,dirname(__FILE__))));
}
{
plugin::save_object();
{
plugin::save_object();
- if(isset($_POST['gotoXDriver'])){
+ if(isset($_POST["inheritAll"])){
+ $this->set_everything_to_inherited();
+ }
+
+ if(isset($_POST['gotoXDriver']) && chkacl($this->acl,"AutoSync") == ""){
if(isset($_POST['AutoSync'])){
$this->AutoSync = true;
}else{
if(isset($_POST['AutoSync'])){
$this->AutoSync = true;
}else{
$this->handle_post_events("modify");
}
$this->handle_post_events("modify");
}
+
+ function set_everything_to_inherited()
+ {
+ $this->gotoXKbLayout = "default";
+ $this->gotoXKbModel = "default";
+ $this->gotoXKbVariant = "default";
+
+ $this->gotoXDriver ="default";
+ $this->gotoXResolution ="default";
+ $this->gotoXColordepth ="default";
+ $this->gotoXMouseType ="default";
+ $this->gotoXMouseport ="default";
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: