summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Robinson <casey@rampantmonkey.com>2018-02-09 11:31:16 -0500
committerCasey Robinson <casey@rampantmonkey.com>2018-08-23 16:56:35 -0400
commit862af22736ef0080b8ae84ac8b7233c66e476f0e (patch)
treee4ffbbca201c13c0033b41a3c5ae2785de46aade
parent3956e6152f5afe0ca684eeeeabfbb540468b146e (diff)
downloaddcphr-testing-feedback.tar.gz
dcphr-testing-feedback.tar.bz2
dcphr-testing-feedback.zip
clear feedback form upon submissiontesting-feedback
-rw-r--r--testing.dcphr.org/feedback_table.html3
-rw-r--r--testing.dcphr.org/index.html10
2 files changed, 10 insertions, 3 deletions
diff --git a/testing.dcphr.org/feedback_table.html b/testing.dcphr.org/feedback_table.html
index 9def012..801c76b 100644
--- a/testing.dcphr.org/feedback_table.html
+++ b/testing.dcphr.org/feedback_table.html
@@ -497,7 +497,7 @@ window.addEventListener('load', function() {
var data = JSON.parse(xhr.response)
console.log(data)
if(data.feedback) {
- var out = "<table id=\"feedback\" class=\"sortable\">\n <tr><th>Submission Time</th><th>Puzzle Name</th><th>Team Members</th><th>Broken Items</th><th>Recommendations</th><th>Puzzle Solving Experience</th></tr>\n"
+ var out = "<table id=\"feedback\" class=\"sortable\">\n <tr><th>Submission Time</th><th>Puzzle Name</th><th>Team Members</th><th>Solve Time</th><th>Broken Items</th><th>Recommendations</th><th>Puzzle Solving Experience</th></tr>\n"
for (var index = 0; index < data.feedback.length; index++) {
feedback = data.feedback[index]
submitted = new Date(feedback.submitted)
@@ -506,6 +506,7 @@ window.addEventListener('load', function() {
out += "<td>" + submitted.toString() + "</td>"
out += "<td>" + user_data["puzzle-name"] + "</td>"
out += "<td>" + user_data["team-members"] + "</td>"
+ out += "<td>" + user_data["solve-time"] + "</td>"
out += "<td>" + user_data["broken-items"] + "</td>"
out += "<td>" + user_data["recommendations"] + "</td>"
out += "<td>" + user_data["description"] + "</td>"
diff --git a/testing.dcphr.org/index.html b/testing.dcphr.org/index.html
index 10afbad..38b3a15 100644
--- a/testing.dcphr.org/index.html
+++ b/testing.dcphr.org/index.html
@@ -15,7 +15,8 @@ window.addEventListener('load', function() {
"team-members": document.getElementById('team-members').value,
"broken-items": document.getElementById('broken-items').value,
"recommendations": document.getElementById('recommendations').value,
- "description": document.getElementById('description').value
+ "description": document.getElementById('description').value,
+ "solve-time": document.getElementById('total-solve-time').value
}
var previous_result = document.getElementById('result')
@@ -33,6 +34,11 @@ window.addEventListener('load', function() {
result.id = 'result'
result.innerHTML = 'Feedback successfully submitted'
result_field.appendChild(result)
+ document.getElementById('team-members').value = ""
+ document.getElementById('broken-items').value = ""
+ document.getElementById('recommendations').value = ""
+ document.getElementById('description').value = ""
+ document.getElementById('total-solve-time').value = ""
} else {
var result_field = document.getElementById('submitbtn').parentElement
var result = document.createElement('div')
@@ -201,7 +207,7 @@ textarea {
</li>
<li>
<label for="total-solve-time">Total Solve Time</label>
- <input id="team-members" type="text" name="team-members" />
+ <input id="total-solve-time" type="text" name="total-solve-time" />
</li>
<li>
<label for="broken-items">Broken items.<br />What stopped this puzzle from working?</label>