X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_tabs.inc;h=e0e8dbe422b0bf555c7fe25940a04bdf3b5aa0bf;hb=365b69553ef4d084fd7bc6bd4fd8aada5918c0ec;hp=94a9dd1f311cdf1a7bcf1ac0474bfb05a1ffa2a9;hpb=505163bc6181c5420f359ab0c82fead6e4f69511;p=gosa.git diff --git a/include/class_tabs.inc b/include/class_tabs.inc index 94a9dd1f3..e0e8dbe42 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -30,6 +30,7 @@ class tabs var $disabled= ""; var $by_name= array(); var $by_object= array(); + var $SubDialog = false; function tabs($config, $data, $dn) { @@ -74,11 +75,11 @@ class tabs $display= $this->gen_tabs(); /* Show object */ - $display.= "\n"; + $display.= "
\n"; $display.= "
\n"; $obj= $this->by_object[$this->current]; - $display.= $obj->execute (); + $display.= $obj->execute(); $this->by_object[$this->current]= $obj; /* Footer for tabbed dialog */ @@ -119,7 +120,7 @@ class tabs function gen_tabs() { $display= ""; - $display.= ""; + $display.= "
"; $index= 0; $style= array("tab_left", "tab_active", "tab_near_active", "tab_right"); foreach ($this->by_name as $class => $name){ @@ -174,6 +175,15 @@ class tabs function delete() { + /* Check if all plugins will ACK for deletion */ + foreach (array_reverse($this->by_object) as $key => $obj){ + $reason= $obj->allow_remove(); + if ($reason != ""){ + print_red(sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason)); + return; + } + } + /* Delete for all plugins */ foreach (array_reverse($this->by_object) as $key => $obj){ $obj->remove_from_parent(); @@ -245,6 +255,39 @@ class tabs } } + + /* Save attributes posted by copy & paste dialog + */ + function saveCopyDialog() + { + foreach ($this->by_object as $key => $obj){ + if($obj->is_account){ + $this->by_object[$key]->saveCopyDialog(); + } + } + } + + + /* return copy & paste dialog + */ + function getCopyDialog() + { + $ret = ""; + $this->SubDialog = false; + foreach ($this->by_object as $key => $obj){ + if($obj->is_account){ + $tmp = $this->by_object[$key]->getCopyDialog(); + if($tmp['status'] == "SubDialog"){ + $this->SubDialog = true; + return($tmp['string']); + }else{ + $ret .= $tmp['string']; + } + } + } + return($ret); + } + } ?>