Code

Added empty option to serviceAdd
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 03:57:52 +0000 (03:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 03:57:52 +0000 (03:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3682 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/ServiceAddDialog.tpl
plugins/admin/systems/class_ServiceAddDialog.inc
plugins/admin/systems/class_goMailServer.inc
plugins/admin/systems/class_serverService.inc

index 6fc2ac68e8f821d34216ac0f6aff16f24d48dfbc..bdd0999ed050d3d405c2d8bf681d9116c5fb3819 100755 (executable)
@@ -12,6 +12,7 @@
 <br>
 <br>{t}Service to add{/t} &nbsp;
        <select name="ServiceName" >
+               <option value="" >&nbsp;</option>
                {html_options options=$Services }
        </select>
 {else}
index a5a284e68dc4405c5841d2818a36a7dec75cad2d..86ab833aca2c9e22bf54c1a3b18e8cb64dcb7292 100644 (file)
@@ -19,7 +19,9 @@ class ServiceAddDialog extends plugin{
   function execute()
   {
     $smarty = get_smarty();
-    $smarty->assign("Services",$this->parent->getAllUnusedServices());
+    $services = $this->parent->getAllUnusedServices();
+    natcasesort($services);
+    $smarty->assign("Services",$services);
     return($smarty->fetch(get_template_path("ServiceAddDialog.tpl", TRUE,dirname(__FILE__))));
  }
 
index cae85ae9d2607dc5d2a740c413198d885c583ef4..02b7bd67c6e9ff3a1469813b7d6d5b337f696cc9 100644 (file)
@@ -475,7 +475,7 @@ class goMailServer extends plugin{
   {
     $flag = $this->StatusFlag;
     $fields['Status']     = $this->$flag;
-    $fields['Message']    = _("Postfix"). " - ".$this->postfixMyhostname;
+    $fields['Message']    = _("Postfix")." ["._("configured for")." ".$this->postfixMyhostname."] ";
     $fields['AllowStart'] = true;
     $fields['AllowStop']  = true;
     $fields['AllowRestart'] = true;
index 26c57163f8fe5d41848f6bd4a3a2949413902bf9..fab65db6903dddd93331b83bab288ca9c389629c 100644 (file)
@@ -165,7 +165,7 @@ class ServerService extends plugin
 
 
     /* Abort dialog */
-    if(isset($_POST['SaveServiceAdd'])){
+    if((isset($_POST['SaveServiceAdd'])) && (!empty($_POST['ServiceName']))){
       $serv = $_POST['ServiceName'];    
       $this->plugins[$serv]->is_account = true;
       $this->dialog  = $this->plugins[$serv];