summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43c42d7)
raw | patch | inline | side by side (parent: 43c42d7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 5 Feb 2009 12:35:36 +0000 (12:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 5 Feb 2009 12:35:36 +0000 (12:35 +0000) |
-Removed HTML tags and avoid sending feedback twice.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13385 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13385 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/setup/class_setupStep_Feedback.inc | patch | blob | history | |
gosa-core/setup/setup_feedback.tpl | patch | blob | history |
diff --git a/gosa-core/setup/class_setupStep_Feedback.inc b/gosa-core/setup/class_setupStep_Feedback.inc
index 2395fd5908bf143e44893737210c8ac0e9f2773f..d655c2e5e79d756cc72786eff4b9e6db1af16df8 100644 (file)
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");
}
$additional_info ="";
-
if(isset($_POST['send_feedback'])){
$msgs = $this->check_feedback();
if(!preg_match("/successful/i",$ret_value)){
msg_dialog::display(_("Feedback error"), _("Cannot send feedback: service temporarily unavailable"), ERROR_DIALOG);
}else{
- $additional_info = "<font color='green'>"._("Feedback sucessfully send")."</font>";
+ $this->feedback_send = TRUE;
}
}
@fclose($ret);
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));
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.");
}
index 20fae54e6fad93b7b63ad37d2b86ad4d280d79b9..eb326bad09e61eed256ea5b6350a4c71ec3693dd 100644 (file)
+
+{if $feedback_send}
+
+ <div class='default' style='margin:12px; '>
+ <font color='green'>{t}Feedback sucessfully send{/t}</font>
+ </div>
+
+{else}
+
<div class='default' style='margin:12px; '>
<h2>{$additional_info}</h2>
</table>
</div>
<input type='submit' name='send_feedback' value='{t}Send feedback{/t}'>
+{/if}
<input type='hidden' name='step_feedback' value='1'>