Commit b0e418a3 by kimth

Merge pull request #518 from MITx/feature/arjun/fix_choicegroup

Get rid of inline flag for choicegroup, radiogroup, and checkboxgroup. 
parents 27347fbc 0757712e
...@@ -185,7 +185,7 @@ def choicegroup(element, value, status, render_template, msg=''): ...@@ -185,7 +185,7 @@ def choicegroup(element, value, status, render_template, msg=''):
if choice.text is not None: if choice.text is not None:
ctext += choice.text # TODO: fix order? ctext += choice.text # TODO: fix order?
choices.append((choice.get("name"), ctext)) choices.append((choice.get("name"), ctext))
context = {'id': eid, 'value': value, 'state': status, 'input_type': type, 'choices': choices, 'inline': True, 'name_array_suffix': ''} context = {'id': eid, 'value': value, 'state': status, 'input_type': type, 'choices': choices, 'name_array_suffix': ''}
html = render_template("choicegroup.html", context) html = render_template("choicegroup.html", context)
return etree.XML(html) return etree.XML(html)
...@@ -226,7 +226,7 @@ def radiogroup(element, value, status, render_template, msg=''): ...@@ -226,7 +226,7 @@ def radiogroup(element, value, status, render_template, msg=''):
choices = extract_choices(element) choices = extract_choices(element)
context = {'id': eid, 'value': value, 'state': status, 'input_type': 'radio', 'choices': choices, 'inline': False, 'name_array_suffix': '[]'} context = {'id': eid, 'value': value, 'state': status, 'input_type': 'radio', 'choices': choices, 'name_array_suffix': '[]'}
html = render_template("choicegroup.html", context) html = render_template("choicegroup.html", context)
return etree.XML(html) return etree.XML(html)
...@@ -244,7 +244,7 @@ def checkboxgroup(element, value, status, render_template, msg=''): ...@@ -244,7 +244,7 @@ def checkboxgroup(element, value, status, render_template, msg=''):
choices = extract_choices(element) choices = extract_choices(element)
context = {'id': eid, 'value': value, 'state': status, 'input_type': 'checkbox', 'choices': choices, 'inline': False, 'name_array_suffix': '[]'} context = {'id': eid, 'value': value, 'state': status, 'input_type': 'checkbox', 'choices': choices, 'name_array_suffix': '[]'}
html = render_template("choicegroup.html", context) html = render_template("choicegroup.html", context)
return etree.XML(html) return etree.XML(html)
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
checked="true" checked="true"
% endif % endif
/> ${choice_description} </label> /> ${choice_description} </label>
% if not inline:
<br/>
% endif
% endfor % endfor
<span id="answer_${id}"></span> <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