Commit d7f947f81a25f23975008780a0da442e5487fb7a

Authored by Miguel Barão
1 parent 8ba210fd
Exists in master and in 1 other branch dev

- clicking legends ticks radio/checkbox.

- legends are now inline.
templates/question-checkbox.html
... ... @@ -7,9 +7,10 @@
7 7 {% for n,opt in enumerate(question['options']) %}
8 8 <a class="list-group-item">
9 9 <input type="checkbox" id="{{ n }}" name="answer" value="{{ n }}">
10   - {{ opt }}
  10 + <label for="{{ n }}">{{ md(opt) }}</label>
11 11 </a>
12 12 {% end %}
13 13 </div>
14 14 </fieldset>
  15 +<input type="hidden" name="question_ref" value="{{ question['ref'] }}">
15 16 {% end %}
16 17 \ No newline at end of file
... ...
templates/question-radio.html
... ... @@ -7,9 +7,10 @@
7 7 {% for n,opt in enumerate(question['options']) %}
8 8 <a class="list-group-item">
9 9 <input type="radio" id="{{ n }}" name="answer" value="{{ n }}">
10   - {{ md(opt) }}
  10 + <label for="{{ n }}">{{ md(opt) }}</label>
11 11 </a>
12 12 {% end %}
13 13 </div>
14 14 </fieldset>
  15 +<input type="hidden" name="question_ref" value="{{ question['ref'] }}">
15 16 {% end %}
16 17 \ No newline at end of file
... ...
templates/question-text.html
... ... @@ -4,4 +4,5 @@
4 4 <fieldset data-role="controlgroup">
5 5 <input type="text" class="form-control" id="answer" name="answer" value="" autofocus>
6 6 </fieldset>
  7 +<input type="hidden" name="question_ref" value="{{ question['ref'] }}">
7 8 {% end %}
8 9 \ No newline at end of file
... ...