Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5b460ff6
Commit
5b460ff6
authored
Sep 16, 2013
by
ichuang
Committed by
Sarina Canelake
Oct 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add inline style flag to formulaequationinput
parent
54ea98d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
common/lib/capa/capa/inputtypes.py
+4
-1
common/lib/capa/capa/templates/formulaequationinput.html
+2
-1
common/lib/capa/capa/tests/test_inputtypes.py
+1
-0
No files found.
common/lib/capa/capa/inputtypes.py
View file @
5b460ff6
...
...
@@ -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
):
"""
...
...
common/lib/capa/capa/templates/formulaequationinput.html
View file @
5b460ff6
<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}"
...
...
common/lib/capa/capa/tests/test_inputtypes.py
View file @
5b460ff6
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment