summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e83bd70)
raw | patch | inline | side by side (parent: e83bd70)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 07:22:39 +0000 (07:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jul 2007 07:22:39 +0000 (07:22 +0000) |
Added Inherit button to workstationGeneric
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6841 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6841 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index c9414bf70b5952f13be74dcefddc2ae221749d02..42029b61323b95cd24544e5772370e5b47ad14cd 100644 (file)
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
+
function workgeneric ($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);
$this->netConfigDNS->acl = $this->acl;
$this->netConfigDNS->cn= $this->cn;
$smarty->assign("netconfig", $this->netConfigDNS->execute());
$smarty->assign("fai_activated",$this->fai_activated);
+
+ $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
+
return($smarty->fetch (get_template_path('workstation.tpl', TRUE)));
}
+
function remove_from_parent()
{
$this->netConfigDNS->acl = $this->acl;
{
plugin::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 workstation failed"));
}
-}
+ function set_everything_to_inherited()
+ {
+ /* 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:
?>
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index a12ac099244755167392beb14dd4f5e2062d83a7..54af9393d7f4567a411d4a39d24d587c35b5c3a4 100644 (file)
var $XKbLayouts =array();
var $XKbVariants =array();
- var $member_of_ogroup = FALSE;
-
function workservice ($config, $dn= NULL, $parent= NULL)
{
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",
"800x600" => "800x600",
$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__))));
}
{
plugin::save_object();
- if(isset($_POST["inheritAll"])){
- $this->set_everything_to_inherited();
- }
-
if(isset($_POST['gotoXDriver']) && chkacl($this->acl,"AutoSync") == ""){
if(isset($_POST['AutoSync'])){
$this->AutoSync = true;
$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:
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 837920e3ea4e5a669bc9f03dd01789623809df36..be645996ff75d16e02a3f86fc9d94eb84cca98f3 100644 (file)
var $customParameters = "";
var $orig_dn = "";
var $ignore_account = TRUE;
- var $member_of_ogroup = FALSE;
/* FAI class selection */
var $FAIclass = array();
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;
- }
-
/* Creating a list of valid Mirrors
* none will not be saved to ldap.
*/
$smarty->assign($value."ACL", chkacl($this->acl, "$value"));
}
- $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
-
/* Show main page */
return($smarty->fetch (get_template_path('workstationStartup.tpl', TRUE,dirname(__FILE__))));
}
$this->customParameters= $_POST["customParameters"];
}
- if(isset($_POST["inheritAll"])){
- $this->set_everything_to_inherited();
- }
}
return($ret);
}
-
- function set_everything_to_inherited()
- {
- $this->gotoBootKernel = "default-inherited";
- $this->gotoLdapServer = "default-inherited";
- $this->FAIdebianMirror= "inherited";
- }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 9d6b9f85d0d3078e06be2f20dfd9e779e0a260fa..0a8f0fd06b5eef39f84fdefb1e58376b426c240d 100644 (file)
<img src="images/folder_gray.png" class="center" title="{t}Select a base{/t}">
{/if}
</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;">
diff --git a/plugins/admin/systems/workstationService.tpl b/plugins/admin/systems/workstationService.tpl
index fe10a2efe7efabe8318a98035fa005d007088000..3cc0357c35fcdbc221d1a772b5a583c9a5939694 100644 (file)
-{if $member_of_ogroup}
-<input type='submit' name='inheritAll' value='{t}Inherit all{/t}'>
-{/if}
<table style="width:100%;" summary="">
<tr>
<td style="width:33%; vertical-align:top;">
diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl
index 446d7475f9239f45c10611a9bad09e8fba77c478..23878411926656b40f3a40f0cf43921637f92d59 100644 (file)
-{if $member_of_ogroup}
-<input type='submit' name='inheritAll' value='{t}Inherit all{/t}'>
-{/if}
-
<table summary="" style="width:100%;">
<tr>
<td style="width:50%; vertical-align:top;">