summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a41bd88)
raw | patch | inline | side by side (parent: a41bd88)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Aug 2006 10:50:21 +0000 (10:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Aug 2006 10:50:21 +0000 (10:50 +0000) |
If ogroup is selected, save directly.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4425 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4425 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index 5cff78e0a4f81cb594288fa5ad7a265825caf2b6..10df0550f8322a226860ed97a9891ca8f68d603b 100644 (file)
/* Create new default terminal
* Or create specified object of selected system type, from given incoming object
*/
+
+ $save_object_directly = false;
+ if(($s_action == "SelectedSystemType") && (isset($_POST['ObjectGroup']) && ($_POST['ObjectGroup'] != "none"))){
+ $save_object_directly = true;
+ }
+
if (isset($_POST['create_system'])||$s_action=="newsystem"||$s_action == "SelectedSystemType") {
/* If the current entry is an incoming object
/* Finish user edit is triggered by the tabulator dialog, so
the user wants to save edited data. Check and save at this
point. */
- if ((isset($_POST['edit_finish'])) && (isset($this->systab->config))){
+ if ((isset($_POST['edit_finish'])) && (isset($this->systab->config)) || $save_object_directly){
/* Check tabs, will feed message array */
- $message= $this->systab->check();
+ $message = array();
+ if(!$save_object_directly){
+ $message = $this->systab->check();
+ }else{
+ $found = false;
+
+ /* Set gotoMode to active if we there was an ogroup selected . (save_object_directly) */
+ foreach(array("workgeneric","servgeneric") as $tab){
+ if(isset($this->systab->by_object[$tab]->gotoMode)) {
+ $found = true;
+ $this->systab->by_object[$tab]->gotoMode = "active";
+ }
+ }
+ if(!$found){
+ print_red(sprintf(_("Can't set gotoMode to status 'avtice', the current object couldn't be identified.")));
+ }
+ }
/* Save, or display error message? */
if (count($message) == 0){
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 7f07d2e8ea1d5fc612fecd3b35f5572d1f595a54..b3b38ac5f1b4b392f4c5d16559c093b8f7c0c31b 100644 (file)
/* Strip out 'default' values */
foreach (array("gotoTerminalPath", "gotoSwapServer", "gotoSyslogServer") as $val){
- if ($this->attrs[$val] == "default"){
+ if (!isset($this->attrs[$val]) || $this->attrs[$val] == "default"){
$this->attrs[$val]= array();
}
}
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 237919660514b6378870c85d50992e52ae2bda42..75c6f962614f7d6e7ece90db75a29121309e677f 100644 (file)
/* Strip out 'default' values */
foreach (array("gotoSyslogServer") as $val){
-
- if ($this->attrs[$val] == "default"){
+ if (!isset($this->attrs[$val]) || $this->attrs[$val] == "default"){
$this->attrs[$val]= array();
}
}