Skip to content

Commit

Permalink
Games: Improve trivia questions interface
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinSRG committed Sep 24, 2016
1 parent 8b7c039 commit c3a699b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bot-modules/games/trivia/server-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ App.server.setHandler('trivia', (context, parts) => {
}

try {
check(text, "Question can be blank");
check(text, "Question cannot be blank");
check(text.length < 250, "Question cannot be longer than 250 characters");
check(aux.length > 0, "You must specify at least one answer");
} catch (err) {
Expand Down Expand Up @@ -103,13 +103,14 @@ App.server.setHandler('trivia', (context, parts) => {
let html = '';
html += '<h2>Trivia Answers</h2>';

html += '<form method="post" action=""><p><strong>Question</strong>:&nbsp;<input name="clue" type="text" size="80" /></p>' +
html += '<form method="post" action="./"><p><strong>Question</strong>:&nbsp;<input name="clue" type="text" size="80" /></p>' +
'<p><strong>Answers</strong>:&nbsp;<input name="answers" type="text" size="80" /></p>' +
'<p><input type="submit" name="add" value="Add" /></p></form>';

for (let id in mod.data) {
html += '<hr />';
html += '<form method="post" action="">';
html += '<a id="a" name="' + id + '"></a>';
html += '<form method="post" action="#' + id + '">';
html += '<input type="hidden" name="id" value="' + id + '" />';
html += '<p><strong>Question</strong>:&nbsp;<input name="clue" type="text" size="80" value="' +
mod.data[id].clue + '" /></p>';
Expand Down

0 comments on commit c3a699b

Please sign in to comment.