Commit 8ba210fd01cecdd4da053b703ee774d325417ac9
1 parent
2fff21e4
Exists in
master
and in
1 other branch
- autofocus text and textarea boxes
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
templates/question-text.html
@@ -2,6 +2,6 @@ | @@ -2,6 +2,6 @@ | ||
2 | 2 | ||
3 | {% block answer %} | 3 | {% block answer %} |
4 | <fieldset data-role="controlgroup"> | 4 | <fieldset data-role="controlgroup"> |
5 | - <input type="text" class="form-control" id="answer" name="answer" value=""> | 5 | + <input type="text" class="form-control" id="answer" name="answer" value="" autofocus> |
6 | </fieldset> | 6 | </fieldset> |
7 | {% end %} | 7 | {% end %} |
8 | \ No newline at end of file | 8 | \ No newline at end of file |
templates/question-textarea.html
@@ -2,6 +2,6 @@ | @@ -2,6 +2,6 @@ | ||
2 | {% autoescape %} | 2 | {% autoescape %} |
3 | 3 | ||
4 | {% block answer %} | 4 | {% block answer %} |
5 | -<textarea class="form-control" rows="{{ question['lines'] }}" name="answer"></textarea><br /> | 5 | +<textarea class="form-control" rows="{{ question['lines'] }}" name="answer" autofocus></textarea><br /> |
6 | <input type="hidden" name="question_ref" value="{{ question['ref'] }}"> | 6 | <input type="hidden" name="question_ref" value="{{ question['ref'] }}"> |
7 | -{% end %} | ||
8 | \ No newline at end of file | 7 | \ No newline at end of file |
8 | +{% end %} |