Merge pull request #1008 from edx/fix/ichuang/inline-for-formulaequationinput
add inline style flag to formulaequationinput
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user