mirror of https://github.com/dirtbags/moth.git
Make answer script-fillable
This commit is contained in:
parent
6ffb693816
commit
da02ec53e9
|
@ -165,7 +165,9 @@ you are a fool.
|
||||||
scripts = puzzle.scripts
|
scripts = puzzle.scripts
|
||||||
title = "{} puzzle {}".format(parts[2], parts[3])
|
title = "{} puzzle {}".format(parts[2], parts[3])
|
||||||
body.write("<h2>Body</h2>")
|
body.write("<h2>Body</h2>")
|
||||||
|
body.write("<div id='body' style='border: solid 1px silver;'>")
|
||||||
body.write(puzzle.html_body())
|
body.write(puzzle.html_body())
|
||||||
|
body.write("</div>")
|
||||||
body.write("<h2>Files</h2>")
|
body.write("<h2>Files</h2>")
|
||||||
body.write("<ul>")
|
body.write("<ul>")
|
||||||
for name,puzzlefile in sorted(puzzle.files.items()):
|
for name,puzzlefile in sorted(puzzle.files.items()):
|
||||||
|
@ -180,6 +182,7 @@ you are a fool.
|
||||||
visibility=visibility))
|
visibility=visibility))
|
||||||
body.write("</ul>")
|
body.write("</ul>")
|
||||||
body.write("<h2>Answers</h2>")
|
body.write("<h2>Answers</h2>")
|
||||||
|
body.write("<p>Input box (for scripts): <input id='answer' name='a'>")
|
||||||
body.write("<ul>")
|
body.write("<ul>")
|
||||||
assert puzzle.answers, 'No answers defined'
|
assert puzzle.answers, 'No answers defined'
|
||||||
for a in puzzle.answers:
|
for a in puzzle.answers:
|
||||||
|
|
|
@ -71,7 +71,7 @@ def generate_html(ziphandle, puzzle, puzzledir, category, points, authors, files
|
||||||
<input type="hidden" name="c" value="{category}">
|
<input type="hidden" name="c" value="{category}">
|
||||||
<input type="hidden" name="p" value="{points}">
|
<input type="hidden" name="p" value="{points}">
|
||||||
<div>Team hash:<input name="t" size="8"></div>
|
<div>Team hash:<input name="t" size="8"></div>
|
||||||
<div>Answer:<input name="a" size="20"></div>
|
<div>Answer:<input name="a" id="answer" size="20"></div>
|
||||||
<input type="submit" value="submit">
|
<input type="submit" value="submit">
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue