From: hickert Date: Wed, 19 May 2010 13:15:09 +0000 (+0000) Subject: Added instant service creation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b520de046e2bf16abf41e1bac751f5a6e9a7ba7;p=gosa.git Added instant service creation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18554 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc index 5e4e35ced..711cc48ee 100644 --- a/gosa-plugins/systems/admin/systems/class_serverService.inc +++ b/gosa-plugins/systems/admin/systems/class_serverService.inc @@ -99,7 +99,7 @@ class ServerService extends management $contents =file_get_contents(get_template_path("serverService-list.xml", true)); $template = " - new_%s + instantNew_%s entry "; @@ -123,6 +123,7 @@ class ServerService extends management $this->registerAction("restart", "updateServiceStatus"); $this->registerAction("stop", "updateServiceStatus"); $this->registerAction("start", "updateServiceStatus"); + $this->registerAction("instantNew", "instantNewService"); } @@ -135,6 +136,10 @@ class ServerService extends management if(isset($_POST['CancelServiceAdd'])) $action['action'] = "newServiceCancel"; if(isset($_POST['SaveService'])) $action['action'] = "saveService"; if(isset($_POST['CancelService'])) $action['action'] = "cancelService"; + if(preg_match("/^instantNew_/",$action['action'])){ + $action['targets'][] = preg_replace("/^instantNew_/i","",$action['action']); + $action['action'] = "instantNew"; + } return($action); } @@ -197,6 +202,19 @@ class ServerService extends management } + /*! \brief Create the selected service. + */ + function instantNewService($action, $targets, $all) + { + $this->closeDialogs(); + $serv = $targets[0]; + $this->plugins[$serv]->is_account = true; + $this->dialogObject = $this->plugins[$serv]; + $this->current = $serv; + $this->dialog = TRUE; + } + + /*! \brief Save the currently edited service. */ function saveService()