|
1 | 1 | {% load static %} |
2 | 2 | <div class="annotation-input"> |
3 | | -<div class="script_placeholder" data-src="{% static 'js/capa/annotationinput.js' %}"/> |
4 | | - |
5 | | -<div class="annotation-header"> |
6 | | - {{ title|safe }} |
7 | | - |
8 | | - {% if return_to_annotation %} |
9 | | - <a class="annotation-return" href="javascript:void(0)">Return to Annotation</a><br/> |
10 | | - {% endif %} |
11 | | -</div> |
12 | | -<div class="annotation-body"> |
13 | | - |
14 | | - <div class="block block-highlight">{{ text|safe }}</div> |
15 | | - <div class="block block-comment">{{ comment|safe }}</div> |
16 | | - |
17 | | - <div class="block">{{ comment_prompt|safe }}</div> |
18 | | - <textarea class="comment" id="input_{{ id }}_comment" name="input_{{ id }}_comment" aria-describedby="answer_{{ id }}">{{ comment_value|safe }}</textarea> |
19 | | - |
20 | | - <div class="block" id="label_{{ id }}">{{ tag_prompt|safe }}</div> |
21 | | - <ul class="tags"> |
22 | | - {% for option in options %} |
23 | | - <li> |
24 | | - {% if has_options_value %} |
25 | | - {% if option.choice == status.classname and status == status.classname %} |
26 | | - <span class="tag-status {{ status.classname }}" aria-describedby="input_{{ id }}_comment"> |
27 | | - {% include "status_span.html" with status=status %} |
28 | | - </span> |
29 | | - {% endif %} |
30 | | - {% endif %} |
31 | | - |
32 | | - <span class="tag |
33 | | - {% if option.id in options_value %} |
34 | | - selected |
35 | | - {% endif %} |
36 | | - " data-id="{{ option.id }}"> |
37 | | - {{ option.description|safe }} |
38 | | - </span> |
39 | | - </li> |
40 | | - {% endfor %} |
41 | | - </ul> |
42 | | - |
43 | | - {% if debug %} |
44 | | - <div class="debug-value"> |
45 | | - Rendered with value:<br/> |
46 | | - <pre>{{ value|safe }}</pre> |
47 | | - Current input value:<br/> |
48 | | - <input type="text" class="value" name="input_{{ id }}" id="input_{{ id }}" value="{{ value }}" /> |
| 3 | + <div class="script_placeholder" |
| 4 | + data-src="{% static 'js/capa/annotationinput.js' %}" /> |
| 5 | + <div class="annotation-header"> |
| 6 | + {{ title|safe }} |
| 7 | + {% if return_to_annotation %} |
| 8 | + <a class="annotation-return" href="javascript:void(0)">Return to Annotation</a> |
| 9 | + <br /> |
| 10 | + {% endif %} |
| 11 | + </div> |
| 12 | + <div class="annotation-body"> |
| 13 | + <div class="block block-highlight">{{ text|safe }}</div> |
| 14 | + <div class="block block-comment">{{ comment|safe }}</div> |
| 15 | + <div class="block">{{ comment_prompt|safe }}</div> |
| 16 | + <textarea class="comment" |
| 17 | + id="input_{{ id }}_comment" |
| 18 | + name="input_{{ id }}_comment" |
| 19 | + aria-describedby="answer_{{ id }}">{{ comment_value|safe }}</textarea> |
| 20 | + <div class="block" id="label_{{ id }}">{{ tag_prompt|safe }}</div> |
| 21 | + <ul class="tags"> |
| 22 | + {% for option in options %} |
| 23 | + <li> |
| 24 | + {% if has_options_value %} |
| 25 | + {% if option.choice == status.classname and status == status.classname %} |
| 26 | + <span class="tag-status {{ status.classname }}" |
| 27 | + aria-describedby="input_{{ id }}_comment"> |
| 28 | + {% include "status_span.html" with status=status %} |
| 29 | + </span> |
| 30 | + {% endif %} |
| 31 | + {% endif %} |
| 32 | + <span class="tag {% if option.id in options_value %}selected{% endif %} " |
| 33 | + data-id="{{ option.id }}">{{ option.description|safe }}</span> |
| 34 | + </li> |
| 35 | + {% endfor %} |
| 36 | + </ul> |
| 37 | + {% if debug %} |
| 38 | + <div class="debug-value"> |
| 39 | + Rendered with value: |
| 40 | + <br /> |
| 41 | + <pre>{{ value|safe }}</pre> |
| 42 | + Current input value: |
| 43 | + <br /> |
| 44 | + <input type="text" |
| 45 | + class="value" |
| 46 | + name="input_{{ id }}" |
| 47 | + id="input_{{ id }}" |
| 48 | + value="{{ value }}" /> |
| 49 | + </div> |
| 50 | + {% else %} |
| 51 | + <input type="hidden" |
| 52 | + class="value" |
| 53 | + name="input_{{ id }}" |
| 54 | + id="input_{{ id }}" |
| 55 | + value="{{ value }}" /> |
| 56 | + {% endif %} |
| 57 | + {% include "status_span.html" with status=status status_id=id %} |
| 58 | + <p id="answer_{{ id }}" class="answer answer-annotation"></p> |
49 | 59 | </div> |
50 | | - {% else %} |
51 | | - <input type="hidden" class="value" name="input_{{ id }}" id="input_{{ id }}" value="{{ value }}" /> |
52 | | - {% endif %} |
53 | | - |
54 | | - {% include "status_span.html" with status=status status_id=id %} |
55 | | - |
56 | | - <p id="answer_{{ id }}" class="answer answer-annotation"></p> |
57 | | -</div> |
58 | 60 | </div> |
59 | | - |
60 | | -{% if msg %} |
61 | | -<span class="message" aria-describedby="label_{{ id }}" tabindex="-1">{{ msg|safe }}</span> |
62 | | -{% endif %} |
| 61 | +{% if msg %}<span class="message" aria-describedby="label_{{ id }}" tabindex="-1">{{ msg|safe }}</span>{% endif %} |
0 commit comments