Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
99963bac
Commit
99963bac
authored
May 20, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support non-editable mode in FormBox.
parent
ec0d621d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
product/ERP5Form/FormBox.py
product/ERP5Form/FormBox.py
+15
-6
No files found.
product/ERP5Form/FormBox.py
View file @
99963bac
...
...
@@ -88,15 +88,24 @@ class FormBoxWidget(Widget.Widget):
"""
Render a form in a field
"""
return
self
.
_render
(
field
,
key
,
value
,
REQUEST
,
render_prefix
=
render_prefix
)
def
render_view
(
self
,
field
,
value
,
REQUEST
,
render_prefix
=
None
):
"""
Render a view form in a field
"""
return
self
.
_render
(
field
,
None
,
value
,
REQUEST
,
render_prefix
=
render_prefix
)
def
_render
(
self
,
field
,
key
,
value
,
REQUEST
,
render_prefix
=
None
):
result
=
''
target_id
=
field
.
get_value
(
'formbox_target_id'
)
if
target_id
not
in
(
None
,
''
):
here
=
REQUEST
[
'here'
]
# If 'cell' is not defined, we define 'cell' just same as 'here', so
# that we can use the same formbox for both ListBox and non-ListBox
# using 'cell' parameter.
if
not
REQUEST
.
has_key
(
'cell'
):
REQUEST
.
set
(
'cell'
,
here
)
result
=
''
target_id
=
field
.
get_value
(
'formbox_target_id'
)
if
target_id
not
in
(
None
,
''
):
try
:
form
=
getattr
(
here
,
target_id
)
except
AttributeError
:
...
...
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