62 lines
1.7 KiB
HTML
62 lines
1.7 KiB
HTML
<% doinline = "inline" if inline else "" %>
|
|
|
|
<div id="inputtype_${id}" class="${'text-input-dynamath' if do_math else ''} capa_inputtype ${doinline} textline" >
|
|
|
|
% if preprocessor is not None:
|
|
<div class="text-input-dynamath_data ${doinline}" data-preprocessor="${preprocessor['class_name']}"/>
|
|
<div class="script_placeholder" data-src="${preprocessor['script_src']}"/>
|
|
% endif
|
|
|
|
% if status in ('unsubmitted', 'correct', 'incorrect', 'incomplete'):
|
|
<div class="${status.classname} ${doinline}" id="status_${id}">
|
|
% endif
|
|
% if hidden:
|
|
<div style="display:none;" name="${hidden}" inputid="input_${id}" />
|
|
% endif
|
|
|
|
<input type="text" name="input_${id}" id="input_${id}" aria-label="${label}" aria-describedby="answer_${id}" value="${value|h}"
|
|
% if do_math:
|
|
class="math"
|
|
% endif
|
|
% if size:
|
|
size="${size}"
|
|
% endif
|
|
% if hidden:
|
|
style="display:none;"
|
|
% endif
|
|
/>
|
|
${trailing_text | h}
|
|
|
|
<span class="status"
|
|
%if status != 'unsubmitted':
|
|
%endif
|
|
aria-describedby="input_${id}" data-tooltip="${status.display_tooltip}">
|
|
<span class="sr">
|
|
%if value:
|
|
${value|h}
|
|
% else:
|
|
${label}
|
|
%endif
|
|
-
|
|
${status.display_name}
|
|
</span>
|
|
</span>
|
|
|
|
<p id="answer_${id}" class="answer"></p>
|
|
|
|
% if do_math:
|
|
<div id="display_${id}" class="equation">`{::}`</div>
|
|
<textarea style="display:none" id="input_${id}_dynamath" name="input_${id}_dynamath"></textarea>
|
|
|
|
% endif
|
|
|
|
% if status in ('unsubmitted', 'correct', 'incorrect', 'incomplete'):
|
|
</div>
|
|
% endif
|
|
|
|
% if msg:
|
|
<span class="message">${msg|n}</span>
|
|
% endif
|
|
|
|
</div>
|