Code

Fixed problem with not clickable buttons in fai package error msgs
[gosa.git] / plugins / admin / fai / class_askClassName.inc
index b9f854f75a252d29009b5b85cb4080344621a959..02fab1345de33a42c7d646468dc58acb8d724c3f 100644 (file)
@@ -113,7 +113,9 @@ class askClassName extends plugin
       $smarty->assign("ClassNamesAvailable", "");
       $smarty->assign("grey", "");
     }
+    ksort($used);
     $smarty->assign("ClassNames", $used);
+    $smarty->assign("ClassName",  $this->ClassName);
     $display.= $smarty->fetch(get_template_path('askClassName.tpl', TRUE));
     return($display);
   }
@@ -142,6 +144,10 @@ class askClassName extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
   
+    if($this->ClassName != preg_replace("/ /","",trim($this->ClassName))){
+      $message[] = _("Spaces are not allowed within class names.");
+    }
+
     if(empty($this->ClassName)){
       $message[]=_("The given class name is empty.");
     }