From: hickert Date: Thu, 5 Feb 2009 12:35:36 +0000 (+0000) Subject: Updated setup step feedback X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=78e738590f8db074f9cc7bb983b9179d2c5d0849;p=gosa.git Updated setup step feedback -Removed HTML tags and avoid sending feedback twice. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13385 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/setup/class_setupStep_Feedback.inc b/gosa-core/setup/class_setupStep_Feedback.inc index 2395fd590..d655c2e5e 100644 --- a/gosa-core/setup/class_setupStep_Feedback.inc +++ b/gosa-core/setup/class_setupStep_Feedback.inc @@ -49,7 +49,7 @@ class Step_Feedback extends setup_step var $features_used = array(); var $initialized = FALSE; - + var $feedback_send = FALSE; var $attributes = array("organization","eMail","name","subscribe","use_gosa_announce","get_started","problems_encountered","features_used", "first_use","use_since","distribution","web_server","php_version","ldap_server","object_count","want_to_see_next"); @@ -123,7 +123,6 @@ class Step_Feedback extends setup_step } $additional_info =""; - if(isset($_POST['send_feedback'])){ $msgs = $this->check_feedback(); @@ -147,7 +146,7 @@ class Step_Feedback extends setup_step if(!preg_match("/successful/i",$ret_value)){ msg_dialog::display(_("Feedback error"), _("Cannot send feedback: service temporarily unavailable"), ERROR_DIALOG); }else{ - $additional_info = ""._("Feedback sucessfully send").""; + $this->feedback_send = TRUE; } } @fclose($ret); @@ -165,6 +164,7 @@ class Step_Feedback extends setup_step foreach($this->attributes as $attr){ $smarty->assign($attr, reverse_html_entities($this->$attr)); } + $smarty->assign("feedback_send",$this->feedback_send); $smarty->assign("years",$years); $smarty->assign("features_used",$this->features_used); $smarty->assign("additional_info", reverse_html_entities($additional_info)); @@ -176,7 +176,7 @@ class Step_Feedback extends setup_step function check_feedback() { $msgs = array(); - if(!tests::is_email($this->eMail) || empty($this->eMail)){ + if($this->subscribe && (!tests::is_email($this->eMail) || empty($this->eMail))){ $msgs[] = _("Please specify a valid email address."); } diff --git a/gosa-core/setup/setup_feedback.tpl b/gosa-core/setup/setup_feedback.tpl index 20fae54e6..eb326bad0 100644 --- a/gosa-core/setup/setup_feedback.tpl +++ b/gosa-core/setup/setup_feedback.tpl @@ -1,3 +1,12 @@ + +{if $feedback_send} + +
+ {t}Feedback sucessfully send{/t} +
+ +{else} +

{$additional_info}

@@ -141,4 +150,5 @@
+{/if}