diff options
| author | hallgren <hallgren@chalmers.se> | 2010-06-02 14:36:09 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2010-06-02 14:36:09 +0000 |
| commit | 1e5984fe2d4875c4864d27b4483bd302d89f7238 (patch) | |
| tree | 04655e07ff1187b779366adfc06a67dc3ad30845 /src | |
| parent | e5bc4328cbeedd8f6235218e014e25b8060d20e8 (diff) | |
Feedback form for phrasebook/minibar
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/javascript/minibar/feedback.cgi | 27 | ||||
| -rw-r--r-- | src/runtime/javascript/minibar/feedback.html | 48 |
2 files changed, 75 insertions, 0 deletions
diff --git a/src/runtime/javascript/minibar/feedback.cgi b/src/runtime/javascript/minibar/feedback.cgi new file mode 100644 index 000000000..626fc60d0 --- /dev/null +++ b/src/runtime/javascript/minibar/feedback.cgi @@ -0,0 +1,27 @@ +#!/bin/bash + +bin=../bin +. $bin/cgistart.sh + +getquery + +if [ -n "$feedback_path" ] && + echo "t=$(date +%F+%T)&ip=$REMOTE_ADDR&$query&accept_language=$HTTP_ACCEPT_LANGUAGE" >> "$feedback_path" +then + + pagestart "Thank you" + echo "Your feedback has been saved." + begin script type="text/javascript" + echo "setTimeout(function(){window.close()},4000);" + end + pageend + +else + + pagestart "Feedback error" + echo "Your feedback could not be saved. Sorry." + p + tag 'input type=button onclick="javascript:history.back()" value="<- Go back"' + pageend + +fi
\ No newline at end of file diff --git a/src/runtime/javascript/minibar/feedback.html b/src/runtime/javascript/minibar/feedback.html new file mode 100644 index 000000000..2e8943229 --- /dev/null +++ b/src/runtime/javascript/minibar/feedback.html @@ -0,0 +1,48 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> <head> +<title>Feedback</title> +<link rel=stylesheet type="text/css" href="minibar.css"> +<script type="text/JavaScript" src="support.js"></script> +<script type="text/JavaScript" src="minibar.js"></script> +<meta name = "viewport" content = "width = device-width"> + +</head> + +<body onload="prefill_feedback_form()"> + +<h2><span id=grammar></span> Feedback</h2> + +<form class=feedback name=feedback action="feedback.cgi" method="post"> +<input type=hidden name="grammar"> + +<p> +<input type=hidden name="from"> <span class=field id=from>...</span> input: +<input type=hidden name="input"> <span class=field id=input>...</span> + +<div id=translation_box> +<p><input type=hidden name="to"> <span class=field id="to">...</span> translation: +<input type=hidden name="translation"> <span class=field id=translation>...</span> + +<p>Suggest a better translation: +<textarea rows=3 name="improvement"></textarea> +</div> + +<p>Comments: +<br><textarea rows=5 name="comment"></textarea> + +<p> +<input type=submit value="Submit Feedback"> +<input type=button value="Cancel" onclick="window.close()"> + + +<input type=hidden name="inner_size"> +<input type=hidden name="outer_size"> +<input type=hidden name="screen_size"> +<input type=hidden name="available_screen_size"> +<input type=hidden name="color_depth"> +<input type=hidden name="pixel_depth"> + +</form> +</body> + +</html> |
