Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
d53885d29c38
Commit
365244b7
authored
Oct 12, 2016
by
Sylvain Thénault
Browse files
Add a custom inlined form renderer that doesn't display title
parent
e0d4e2917137
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/widgets.py
View file @
d53885d2
...
...
@@ -250,9 +250,20 @@ class SimplifiedAutomaticEntityForm(autoform.AutomaticEntityForm):
class
NoTitleEntityInlinedFormRenderer
(
formrenderers
.
EntityInlinedFormRenderer
):
"""Custom inlined form renderer that doesn't display any title nor remove link.
This is intended to be subclassed with a custom selector.
"""
__abstract__
=
True
def
render_title
(
self
,
w
,
form
,
values
):
pass
class
ConcretNoTitleEntityInlinedFormRenderer
(
NoTitleEntityInlinedFormRenderer
):
"""Concret implementation of `NoTitleEntityInlinedFormRenderer` with a custom regid.
Use this one by specifying the renderer id explicitly, for case where you can't easily specify a
selector.
"""
__regid__
=
'notitle'
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