additional minor change: allow "inline" attrib on textline
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<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':
|
||||
|
||||
Reference in New Issue
Block a user