Commit 571abdfed7c825975b3a5b0881f7f00cd23315e6

Authored by Miguel Barão
1 parent 6d2fed80
Exists in master and in 1 other branch dev

- textarea shows last wrong result.

BUGS.md
... ... @@ -7,9 +7,11 @@ BUGS:
7 7  
8 8 SOLVED:
9 9  
  10 +- textarea mantem ultima resposta errada. util para respostas grandes.
10 11 - ver campo hidden com ref que esta na textarea mas nao nos outros.
11 12 - shift enter submete textarea
12 13 - clicar texto selecciona checkboxes/radio.
13 14 - focar text/textarea
14 15 - implementar template base das perguntas base e estender para cada tipo.
15 16 - submissão com enter em perguntas text faz get? provavelmente está a fazer o submit do form em vez de ir pelo ajax.
  17 +
... ...
templates/learn.html
... ... @@ -45,7 +45,7 @@
45 45 <span class="icon-bar"></span>
46 46 </button>
47 47 <a class="navbar-brand" href="#">
48   - MonkeyBrain
  48 + Penalty
49 49 </a>
50 50 </div>
51 51 <div class="collapse navbar-collapse" id="myNavbar">
... ...
templates/question-textarea.html
1 1 {% extends "question.html" %}
2 2  
3 3 {% block answer %}
4   -<textarea class="form-control" rows="{{ question['lines'] }}" name="answer" autofocus></textarea><br />
  4 +<textarea class="form-control" rows="{{ question['lines'] }}" name="answer" autofocus>{{ question['answer'][0] if question['answer'] is not None else '' }}</textarea><br />
5 5 <input type="hidden" name="question_ref" value="{{ question['ref'] }}">
6 6 {% end %}
... ...