-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.html
70 lines (69 loc) · 3.61 KB
/
feedback.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
<div data-template="jmmc-about:changelog">
<form role="form" method="post" action="https://www.jmmc.fr/feedback/feedback.php" enctype="multipart/form-data" class="col-md-8 col-md-offset-2">
<div class="form-group">
<label for="userEmail">Your email</label>
<input type="email" class="form-control" name="userEmail" id="userEmail" placeholder="Enter email address" data-template="app:input-user-email" required="required"/>
</div>
<div class="hidden">
<label>Extra</label>
<input type="text" clas="form-control" size="50" name="extra1"/>
<input type="text" clas="form-control" size="50" name="extra2"/>
<input type="text" clas="form-control" size="50" name="extra3"/>
</div>
<div class="form-group">
<label for="feedbackType">Type</label>
<select class="form-control" name="feedbackType" required="required">
<option selected="" value="">Select Feedback Type</option>
<option value="defect">Bug Report</option>
<option value="documentation">Documentation</option>
<option value="enhancement">Evolution Request</option>
<option value="task">Support Needed</option>
</select>
</div>
<div class="form-group">
<label for="summary">Summary</label>
<input type="text" class="form-control" name="summary" id="summary" size="80" required="required"/>
<!-- <p class="help-block">Help</p> -->
</div>
<div class="form-group">
<label for="comments">Comments</label>
<textarea class="form-control" name="comments" cols="80" rows="16" required="required"/>
</div>
<input type="hidden" name="systemConfig" value="Unknown"/>
<input type="hidden" name="applicationName" value="OiDB"/>
<input type="hidden" name="applicationVersion" data-template="jmmc-about:version-as-attribute" data-template-attrname="value"/>
<input type="hidden" name="applicationLog" value="None"/>
<input type="hidden" name="applicationSpecificInformation" value="None"/>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<script type="text/javascript">
// search for a cookie of the given name
function get_cookie(name) {
var cookies = document.cookie.split(';');
for (var i in cookies) {
var cookie = cookies[i];
if (cookie.indexOf(name + "=") == 0) {
return cookie.slice(name.length + 1);
}
}
return false;
};
// on load, try filling the email field with persisted value
$(function () {
var email = get_cookie("email");
if (email) $('#userEmail').val(email);
});
// on submit, persist the email of the user for 15 days as cookie
$('form').submit(function (event) {
var d = new Date();
d.setTime(d.getTime()+(15*24*60*60*1000));
document.cookie =
"email=" + $("#userEmail").val() + "; " +
"expires=" + d.toGMTString() + "; " +
"path=" + window.location.pathname;
});
</script>
</div>