Commit 5b460ff6 by ichuang Committed by Sarina Canelake

add inline style flag to formulaequationinput

parent 54ea98d2
......@@ -1081,7 +1081,10 @@ class FormulaEquationInput(InputTypeBase):
"""
Can set size of text field.
"""
return [Attribute('size', '20'), ]
return [
Attribute('size', '20'),
Attribute('inline', False),
]
def _extra_context(self):
"""
......
<section id="formulaequationinput_${id}" class="inputtype formulaequationinput">
<% doinline = 'style="display:inline-block;vertical-align:top"' if inline else "" %>
<section id="formulaequationinput_${id}" class="inputtype formulaequationinput" ${doinline}>
<div class="${reported_status}" id="status_${id}">
<input type="text" name="input_${id}" id="input_${id}"
data-input-id="${id}" value="${value|h}"
......
......@@ -808,6 +808,7 @@ class FormulaEquationTest(unittest.TestCase):
'msg': '',
'size': self.size,
'previewer': '/static/js/capa/src/formula_equation_preview.js',
'inline': False,
}
self.assertEqual(context, expected)
......
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