jstextline.html 941 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
<section id="jstextline_${id}" class="jstextline">
  <input type="text" name="input_${id}" id="input_${id}" value="${value}"
   % if size:
   size="${size}"
   % endif
   % if dojs == 'math':
   onkeyup="DoUpdateMath('${id}')"
   % endif
   />
10 11 12 13 14 15 16 17 18 19 20 21 22

  % if dojs == 'math':
    <span id="display_${id}">`{::}`</span>
  % endif

  <span id="answer_${id}"></span>

  % if dojs == 'math':
    <textarea style="display:none" id="input_${id}_fromjs" name="input_${id}_fromjs"></textarea>
  % endif

  % if state == 'unsubmitted':
  <span class="unanswered" style="display:inline-block;" id="status_${id}"></span>
23
  % elif state == 'correct':
24 25 26 27 28 29 30 31 32 33 34
  <span class="correct" id="status_${id}"></span>
  % elif state == 'incorrect':
  <span class="incorrect" id="status_${id}"></span>
  % elif state == 'incomplete':
  <span class="incorrect" id="status_${id}"></span>
  % endif
  % if msg:
    <br/>
    <span class="debug">${msg|n}</span>
  % endif
</section>