Commit ce5540b2 by Lyla Fischer

textine size addition

parent 8fe162a2
......@@ -8,7 +8,8 @@ class textline(object):
def render(element, value, state):
eid=element.get('id')
count = int(eid.split('_')[-2])-1 # HACK
context = {'id':eid, 'value':value, 'state':state, 'count':count}
size = element.get('size') or 0
context = {'id':eid, 'value':value, 'state':state, 'count':count, 'size': size}
html=render_to_string("textinput.html", context)
return etree.XML(html)
......
<section class="text-input">
<input type="text" name="input_${id}" id="input_${id}" value="${value}" />
<input type="text" name="input_${id}" id="input_${id}" value="${value}" size="${size}" />
<span id="answer_${id}"></span>
......
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