gerv%gerv.net 4771f3b4a2 Bug 454262 - beef up warning about public nature of data; make name optional.
git-svn-id: svn://10.0.0.236/trunk@254170 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-11 16:09:12 +00:00

205 lines
5.9 KiB
Cheetah

[%# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Hendrix Feedback System.
#
# The Initial Developer of the Original Code is
# Gervase Markham.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Reed Loden <reed@reedloden.com>
#
# The Initial Developer wrote this software to the Glory of God.
# ***** END LICENSE BLOCK ***** %]
[% script = BLOCK %]
var ids = ["subject", "comments", "recaptcha_response_field"];
function checkSubmitEnable() {
/* To enable the button, all fields must have a value */
var enable = true;
for (var i = 0; i < ids.length; i++) {
if (document.getElementById(ids[i]).value == "") {
enable = false;
break;
}
}
document.getElementById("send-feedback").disabled = !enable;
}
function browserDetect() {
var userAgent = navigator.userAgent;
var matches = [
{ regexp: /SeaMonkey/, product: "SeaMonkey" },
{ regexp: /Camino/, product: "Camino" },
{ regexp: /\/3\.1[ab]\d+([^p]|$)/, product: "Shiretoko" },
{ regexp: /Minefield/, product: "Minefield" },
{ regexp: /Shiretoko/, product: "Shiretoko" },
];
var defaultProduct = "[% form.product FILTER remove('"') %]";
if (!defaultProduct) {
for (var i = 0; i < matches.length; i++) {
if (userAgent.match(matches[i]["regexp"])) {
defaultProduct = matches[i].product;
break;
}
}
}
if (defaultProduct) {
var prod = document.getElementById("product");
for (var j = 0; j < prod.options.length; j++) {
if (prod.options[j].text == defaultProduct) {
prod.selectedIndex = j;
}
}
}
}
function onLoad() {
/* Add the event listeners, and disable the button initially */
for (var i = 0; i < ids.length; i++) {
document.getElementById(ids[i]).onkeyup = checkSubmitEnable;
}
checkSubmitEnable();
browserDetect();
}
[% END %]
[% PROCESS header.html.tmpl
title = "Hendrix - mozilla.org Feedback System"
onload = "onLoad()"
%]
<p>This system is for feedback on Firefox, Thunderbird and other Mozilla
projects.</p>
<fieldset>
<legend>Other Options</legend>
<ul>
<li><b>Need support?</b>
<a href="http://www.mozilla.org/support/">Go here</a>
<li><b>Broken website?</b>
Visit it, then select <tt>Help | Report Broken Web Site...</tt> from the browser menu
<li><b>Specific and detailed bug report?</b>
<a href="https://bugzilla.mozilla.org/enter_bug.cgi">Go here</a>
</ul>
</fieldset>
<p style="text-align: center; color: darkred">
<b>Please accept our thanks, but do not expect a response to feedback submitted here.</b></p>
<form id="feedback-form" method="POST">
<table id="feedback-table">
<tr>
<td class="label">Name:</td>
<td class="widget">
<input id="name" name="name" type="text"
value="[% form.email FILTER html %]"/>
</td>
</tr>
<tr>
<td class="label">Email:</td>
<td class="widget">
<input id="email" name="email" type="text"
value="[% form.email FILTER html %]"/> (optional)
</td>
</tr>
<tr>
<td class="label">
Product:
</td>
<td class="widget">
<select id="product" name="product">
[% FOREACH product = products %]
[% NEXT IF product == "Other" %]
<option name="[% product %]"
[% " selected='selected'" IF product == default_product %]
>[% product %]</option>
[% END %]
<option name="Other">Other (please state)</option>
</select>
</td>
</tr>
<tr>
<td class="label">
Summary:
</td>
<td class="widget">
<input id="subject" name="subject" type="text"
value="[% form.subject FILTER html %]"/>
</td>
</tr>
<tr>
<td class="label">
Detailed Feedback:
</td>
<td class="widget">
<textarea id="comments" name="comments" wrap="hard" cols="72"
>[% form.comments FILTER html %]</textarea>
</td>
</tr>
<tr>
<td class="label">
Humanness Check:
</td>
<td class="widget">
<script type="text/javascript"
src="http://api.recaptcha.net/challenge?k=[% recaptcha_public_key %]">
</script>
<noscript>
<iframe src="http://api.recaptcha.net/noscript?k=[% recaptcha_public_key %]"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
</td>
</tr>
<tr>
<td></td>
<td>
<input id="send-feedback" type="submit" value="Send Feedback"/>
</td>
</tr>
</table>
<input type="hidden" name="useragent" id="useragent" value=""/>
<script type="text/javascript">
if (document.getElementById)
{
var useragent = navigator.userAgent;
document.getElementById("useragent").setAttribute("value", useragent);
}
</script>
<input type="hidden" name="action" value="submit"/>
</form>
<p>
<b>All</b> information submitted here, including name and email address, will be publicly-readable. <b>Do not submit private information.</b> Your email address will be obfuscated to make life difficult for spammers.
</p>
[% PROCESS footer.html.tmpl %]