summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f9da07)
raw | patch | inline | side by side (parent: 4f9da07)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 Jul 2007 07:33:44 +0000 (07:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 Jul 2007 07:33:44 +0000 (07:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6855 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 1526e213eb69a7f2ed2c5a44c4ef00b0a7c2b625..4337b6b7f8e5009c84fed1fc7d2d1d2d9f0b8a34 100644 (file)
var $fai_activated = FALSE;
var $view_logged = FALSE;
+ var $member_of_ogroup = FALSE;
+
function termgeneric ($config, $dn= NULL, $parent= NULL)
{
/* Check if FAI is activated */
}
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->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
/* Read arrays */
foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
$smarty->assign($val."_select", $this->$val);
}
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
+
/* Show main page */
$smarty->assign("netconfig", $this->netConfigDNS->execute());
return($smarty->fetch (get_template_path('terminal.tpl', TRUE)));
$this->inheritTimeServer = false;
}
}
+
+ if(isset($_POST["inheritAll"])){
+ $this->set_everything_to_inherited();
+ }
+
}
"FAIstate" => _("Action flag"))
));
}
+
+
+ function set_everything_to_inherited()
+ {
+ $this->gotoTerminalPath = "default";
+ $this->gotoSwapServer = "default" ;
+ $this->gotoSyslogServer = "default";
+ $this->inheritTimeServer = TRUE;
+
+ /* Set workstation service attributes to inherited */
+ if($this->member_of_ogroup && isset($this->parent->by_object['termservice'])){
+ foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
+ "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseType") as $name){
+ $this->parent->by_object['termservice']->$name = "default";
+ }
+ }
+
+ /* Set workstation startup attributes to inherited */
+ if($this->member_of_ogroup && isset($this->parent->by_object['termstartup'])){
+ $this->parent->by_object['termstartup']->gotoBootKernel = "default-inherited";
+ $this->parent->by_object['termstartup']->gotoLdapServer = "default-inherited";
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 70d3dfce9d7e84239e9941a513f856b38de3edd5..294f8e537f1bea00d1bb16243e1732e0943ea818 100644 (file)
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
+
function workgeneric ($config, $dn= NULL, $parent= NULL)
{
$tmp = search_config($config->data,"faiManagement","CLASS");
}
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->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
/* Read arrays */
/* tell smarty the inherit checkbox state */
$smarty->assign("inheritTimeServer",$this->inheritTimeServer);
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
/* Show main page */
$smarty->assign("netconfig", $this->netConfigDNS->execute());
$og->save ();
}
}
+
+ if(isset($_POST["inheritAll"])){
+ $this->set_everything_to_inherited();
+ }
}
));
}
-}
+ function set_everything_to_inherited()
+ {
+ $this->gotoSyslogServer = "default";
+ $this->inheritTimeServer = TRUE;
+
+ /* Set workstation service attributes to inherited */
+ if($this->member_of_ogroup && isset($this->parent->by_object['workservice'])){
+ foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant",
+ "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseType") as $name){
+ $this->parent->by_object['workservice']->$name = "default";
+ }
+ }
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+ /* Set workstation startup attributes to inherited */
+ if($this->member_of_ogroup && isset($this->parent->by_object['workstartup'])){
+ $this->parent->by_object['workstartup']->gotoBootKernel = "default-inherited";
+ $this->parent->by_object['workstartup']->gotoLdapServer = "default-inherited";
+ $this->parent->by_object['workstartup']->FAIdebianMirror= "inherited";
+ }
+ }
+}
+ // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index c8bc445e70d405f41617c1df638453a426b3669f..a943fc86c2b5ad0f7be5a182f3dfcdb4d405a7e6 100644 (file)
</td>
</tr>
</table>
+{if $member_of_ogroup}
+ <br>
+ <br>
+ <br>
+ <input type='submit' name='inheritAll' value='{t}Inherit all{/t}'>
+{/if}
</td>
<td style="vertical-align:top;border-left:1px solid #A0A0A0;" >
<table summary="">
index ed79e540718a73dbe4781137b9430496dad2a3a1..9caee6e777ee563c6d77a3b6b693f4f6379cea24 100644 (file)
</td>
</tr>
</table>
+{if $member_of_ogroup}
+ <br>
+ <br>
+ <br>
+ <input type='submit' name='inheritAll' value='{t}Inherit all{/t}'>
+{/if}
</td>
<td style="vertical-align:top;border-left:1px solid #A0A0A0;">
<table summary="">