summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1d0ad6)
raw | patch | inline | side by side (parent: b1d0ad6)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Oct 2009 09:02:01 +0000 (09:02 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Oct 2009 09:02:01 +0000 (09:02 +0000) |
button and act immediately, if this dialog is confirmed.
(Trac: #3020)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14463 594d385d-05f5-0310-b6e9-bd551577e9d8
(Trac: #3020)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14463 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc | patch | blob | history |
diff --git a/trunk/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc b/trunk/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
index c8072711949ab4eebde08e95445c36b8174b48d3..bc8149be53f05ccbd33fd092911196686b5f5b61 100644 (file)
var $nfsservers = array();
var $swapservers = array();
var $member_of_ogroup= false;
- var $members_inherit_from_group = true;
+ var $inherit_confirmation;
function termgroup (&$config, $dn= NULL, $parent= NULL)
{
/* Handle the inherit to members button */
if (isset($_POST['inheritToMembers'])) {
- $this->members_inherit_from_group = true;
+ $this->inherit_confirmation = new msg_dialog(_("Pass on attributs to all members"), _("This action will overwrite all values in the member objects by the values specified in this object group. Do you want to oproceed??"),CONFIRM_DIALOG);
+ }
+
+ if (is_object($this->inherit_confirmation) && ($this->inherit_confirmation->is_confirmed())) {
+ $this->pass_attributes_to_members();
}
/* Watch for events */
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()
+ function pass_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, 'workstation/workgeneric');
- $member_obj->by_object['workgeneric']->set_everything_to_inherited();
- $member_obj->save();
- }
+ foreach ($this->member_dn as $dn) {
+ $member_obj = new worktabs($this->config, $this->config->data['TABS']['WORKTABS'], $dn, 'workstation/workgeneric');
+ $member_obj->by_object['workgeneric']->set_everything_to_inherited();
+ $member_obj->save();
}
}