summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7538de7)
raw | patch | inline | side by side (parent: 7538de7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Oct 2009 12:53:25 +0000 (12:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 1 Oct 2009 12:53:25 +0000 (12:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14445 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc | patch | blob | history | |
gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc b/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
index 53556ea08e0c5cec0c48f6e9849b4b3d06f0cb81..26175895ad85a0bc18173759e7ca20d966de96e4 100644 (file)
/* attribute list for save action */
var $members= array();
+ /* Stores a list of the member dn's */
+ var $member_dn = array();
+
var $gotoMode = "locked";
var $gotoSyslogServer = "";
var $gotoNtpServer = array();
var $nfsservers = array();
var $swapservers = array();
var $member_of_ogroup= false;
-
+ var $members_inherit_from_group = false;
function termgroup (&$config, $dn= NULL, $parent= NULL)
{
if(isset($this->attrs['member'])){
for ($i= 0; $i<$this->attrs['member']['count']; $i++){
$member= $this->attrs['member'][$i];
+ array_push($this->member_dn, $member);
$ldap->cat($member, array('objectClass', 'macAddress', 'cn'));
if ($ldap->success()){
$attrs = $ldap->fetch();
/* Show main page */
+ $smarty->assign("members_inherit_from_group", $this->members_inherit_from_group);
return ($smarty->fetch (get_template_path('termgroup.tpl', TRUE, dirname(__FILE__))));
}
plugin::save_object();
/* Set inherit mode */
if(isset($_POST['workgeneric_posted'])){
+
+ /* Handle the inherit to members button */
+ $this->members_inherit_from_group = isset($_POST['members_inherit_from_group']);
+
if(isset($_POST["inheritTimeServer"])){
$this->inheritTimeServer = true;
}else{
plugin::save();
+ /* Tell members to inherit all attributes if the flag is set */
+ $this->inherit_attributes_to_members();
+
/***************
Prepare special vars
***************/
));
}
+ function inherit_attributes_to_members()
+ {
+ if ($this->members_inherit_from_group) {
+ foreach ($this->member_dn as $dn) {
+ $member_obj = new worktabs($this->config, $this->config->data['TABS']['WORKTABS'], $dn);
+ $member_obj->by_object['workgeneric']->set_everything_to_inherited();
+ $member_obj->save();
+ }
+ }
+ }
+
function PrepareForCopyPaste($source)
{
/* Create used ntp server array */
diff --git a/gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl b/gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl
index af2d0a5d7484722fca129037fa7546633c838b27..dd103f91808eafe3f89af870de8015c0e12840d7 100644 (file)
</td>
<td style="vertical-align:top;border-left:1px solid #A0A0A0;">
- <!-- Bottom right -->
+ <!-- Bottom right -->
+
+ <input type='checkbox' value='1' {if $members_inherit_from_group} checked {/if} name='members_inherit_from_group'>
+{t}Inherit all values to group members{/t}
</td>
</tr>
</table>