Commit 7a27a978 by ichuang

add "msg" output to textline

parent b487003d
...@@ -208,7 +208,7 @@ def textline(element, value, state, msg=""): ...@@ -208,7 +208,7 @@ def textline(element, value, state, msg=""):
eid=element.get('id') eid=element.get('id')
count = int(eid.split('_')[-2])-1 # HACK count = int(eid.split('_')[-2])-1 # HACK
size = element.get('size') size = element.get('size')
context = {'id':eid, 'value':value, 'state':state, 'count':count, 'size': size} context = {'id':eid, 'value':value, 'state':state, 'count':count, 'size': size, 'msg': msg}
html=render_to_string("textinput.html", context) html=render_to_string("textinput.html", context)
return etree.XML(html) return etree.XML(html)
......
...@@ -16,4 +16,7 @@ ...@@ -16,4 +16,7 @@
% elif state == 'incomplete': % elif state == 'incomplete':
<span class="incorrect" id="status_${id}"></span> <span class="incorrect" id="status_${id}"></span>
% endif % endif
% if msg:
<span class="message">${msg|n}</span>
% endif
</section> </section>
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