Code

Updated workstation Startup.
[gosa.git] / gosa-core / setup / class_setupStep_Feedback.inc
index fbcfb4c97bfeb4d4be04e70f0d9e5d973ab05ac6..53993ce4ae95bc46a065a4dc9624764a2ada1e22 100644 (file)
@@ -128,7 +128,7 @@ class Step_Feedback  extends setup_step
       $msgs = $this->check_feedback();
       if(count($msgs)){
         foreach($msgs as $msg){
-          print_red($msg);
+          msg_dialog::display(_("Setup error"), $msg, ERROR_DIALOG);
         }
       }else{
         $str = $this->create_serialise_data_string(); 
@@ -137,14 +137,14 @@ class Step_Feedback  extends setup_step
         $ret = @fopen($feedback_url,"r");
 
         if(!$ret){
-          print_red(sprintf(_("Could not connect to feedback server (%s). There is possibly no connection to the internet."),$this->feedback_url));
+          msg_dialog::display(_("Feedback error"), sprintf(_("Cannot send feedback to '%s': %s"), $this->feedback_url, $ret), ERROR_DIALOG);
         }else{
           $ret_value="";
           while($ret && !feof($ret)){
             $ret_value.= fgets($ret,256);
           }
           if(!preg_match("/successful/i",$ret_value)){
-            print_red(_("Error while sending your feedback. The service is possible temporary unavailable"));
+            msg_dialog::display(_("Feedback error"), _("Cannot send feedback: service temporarily unavailable"), ERROR_DIALOG);
           }else{
             $additional_info = "<font color='green'>"._("Feedback sucessfully send")."</font>";
           }
@@ -175,12 +175,12 @@ class Step_Feedback  extends setup_step
   function check_feedback()
   {
     $msgs = array();
-    if(!is_email($this->eMail) || empty($this->eMail)){
+    if(!tests::is_email($this->eMail) || empty($this->eMail)){
       $msgs[] = _("Please specify a valid email address.");
     }
 
     if(!$this->subscribe && !$this->use_gosa_announce){
-      $msgs[] = _("You should have enabled at least one option, to subscribe or send your feedback.");
+      $msgs[] = _("You have to select at least one of both options, subscribe or send feedback.");
     }
 
     return($msgs);