summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd7be53)
raw | patch | inline | side by side (parent: cd7be53)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 08:27:02 +0000 (08:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 08:27:02 +0000 (08:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6843 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_terminalGeneric.inc | patch | blob | history | |
plugins/admin/systems/terminal.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 353ee0d324e67eeeaaaecd467bb0f957faf3256e..5a9f52357e450a8afc5acdb9c24874c07f9759b9 100644 (file)
var $fai_activated = 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("netconfig", $this->netConfigDNS->execute());
$smarty->assign("fai_activated",$this->fai_activated);
$smarty->assign("actionACL", chkacl($this->acl, 'action'));
+
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
+
return($smarty->fetch (get_template_path('terminal.tpl', TRUE)));
}
{
plugin::save_object();
$this->netConfigDNS->save_object();
+
+ if(isset($_POST["inheritAll"])){
+ $this->set_everything_to_inherited();
+ }
+
/* Save base, since this is no LDAP attribute */
if (isset($_POST['base']) && chkacl($this->acl, "create") == ""){
$this->base= $_POST['base'];
show_ldap_error($ldap->get_error(), _("Saving terminal failed"));
}
+
+ function set_everything_to_inherited()
+ {
+ /* 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:
index 677297a6337b93e2e2a950dcb924443cd188a1bc..60b4cb32ca159d4cc27b42bcc52f311b0a134bcc 100644 (file)
{/if}
</td>
</tr>
+{if $member_of_ogroup}
+ <tr>
+ <td>
+ {t}Inheritance{/t}
+ </td>
+ <td>
+ <input type='submit' name='inheritAll' value='{t}Inherit all{/t}'>
+ </td>
+ </tr>
+{/if}
</table>
</td>
<td style="vertical-align:top;border-left:1px solid #A0A0A0;" >