Commit d7f947f81a25f23975008780a0da442e5487fb7a
1 parent
8ba210fd
Exists in
master
and in
1 other branch
- clicking legends ticks radio/checkbox.
- legends are now inline.
Showing
3 changed files
with
5 additions
and
2 deletions
Show diff stats
templates/question-checkbox.html
@@ -7,9 +7,10 @@ | @@ -7,9 +7,10 @@ | ||
7 | {% for n,opt in enumerate(question['options']) %} | 7 | {% for n,opt in enumerate(question['options']) %} |
8 | <a class="list-group-item"> | 8 | <a class="list-group-item"> |
9 | <input type="checkbox" id="{{ n }}" name="answer" value="{{ n }}"> | 9 | <input type="checkbox" id="{{ n }}" name="answer" value="{{ n }}"> |
10 | - {{ opt }} | 10 | + <label for="{{ n }}">{{ md(opt) }}</label> |
11 | </a> | 11 | </a> |
12 | {% end %} | 12 | {% end %} |
13 | </div> | 13 | </div> |
14 | </fieldset> | 14 | </fieldset> |
15 | +<input type="hidden" name="question_ref" value="{{ question['ref'] }}"> | ||
15 | {% end %} | 16 | {% end %} |
16 | \ No newline at end of file | 17 | \ No newline at end of file |
templates/question-radio.html
@@ -7,9 +7,10 @@ | @@ -7,9 +7,10 @@ | ||
7 | {% for n,opt in enumerate(question['options']) %} | 7 | {% for n,opt in enumerate(question['options']) %} |
8 | <a class="list-group-item"> | 8 | <a class="list-group-item"> |
9 | <input type="radio" id="{{ n }}" name="answer" value="{{ n }}"> | 9 | <input type="radio" id="{{ n }}" name="answer" value="{{ n }}"> |
10 | - {{ md(opt) }} | 10 | + <label for="{{ n }}">{{ md(opt) }}</label> |
11 | </a> | 11 | </a> |
12 | {% end %} | 12 | {% end %} |
13 | </div> | 13 | </div> |
14 | </fieldset> | 14 | </fieldset> |
15 | +<input type="hidden" name="question_ref" value="{{ question['ref'] }}"> | ||
15 | {% end %} | 16 | {% end %} |
16 | \ No newline at end of file | 17 | \ No newline at end of file |
templates/question-text.html
@@ -4,4 +4,5 @@ | @@ -4,4 +4,5 @@ | ||
4 | <fieldset data-role="controlgroup"> | 4 | <fieldset data-role="controlgroup"> |
5 | <input type="text" class="form-control" id="answer" name="answer" value="" autofocus> | 5 | <input type="text" class="form-control" id="answer" name="answer" value="" autofocus> |
6 | </fieldset> | 6 | </fieldset> |
7 | +<input type="hidden" name="question_ref" value="{{ question['ref'] }}"> | ||
7 | {% end %} | 8 | {% end %} |
8 | \ No newline at end of file | 9 | \ No newline at end of file |