Commit b23bfc75 by ichuang

additional minor change: allow "inline" attrib on textline

parent ed1a08d3
......@@ -293,7 +293,9 @@ def textline(element, value, status, render_template, msg=""):
hidden = element.get('hidden', '') # if specified, then textline is hidden and id is stored in div of name given by hidden
escapedict = {'"': '"'}
value = saxutils.escape(value, escapedict) # otherwise, answers with quotes in them crashes the system!
context = {'id': eid, 'value': value, 'state': status, 'count': count, 'size': size, 'msg': msg, 'hidden': hidden}
context = {'id': eid, 'value': value, 'state': status, 'count': count, 'size': size, 'msg': msg, 'hidden': hidden,
'inline': element.get('inline',''),
}
html = render_template("textinput.html", context)
try:
xhtml = etree.XML(html)
......
<section id="textinput_${id}" class="textinput">
<section id="textinput_${id}" class="textinput"
% if inline:
style="display:inline"
% endif
>
% if state == 'unsubmitted':
<div class="unanswered" id="status_${id}">
<div class="unanswered" id="status_${id}"
% if inline:
style="display:inline"
% endif
>
% elif state == 'correct':
<div class="correct" id="status_${id}">
% elif state == 'incorrect':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment