Commit d6835766 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[ui] monkeypatch EntityInlinedFormRenderer as CSS customization leaves a...

[ui] monkeypatch EntityInlinedFormRenderer as CSS customization leaves a trailing '#' on inlined form's title
parent 3cbe638df1a3
......@@ -14,10 +14,6 @@ form.releditForm div.iformBody label {
padding-left: 1em;
span.icounter {
display: none;
div.btn-group {
margin-bottom: 1em;
\ No newline at end of file
......@@ -15,10 +15,12 @@
# with this program. If not, see <>.
"""cubicweb-seda custom fields/widgets"""
from logilab.common.decorators import monkeypatch
from cubicweb import tags
from cubicweb.uilib import js
from cubicweb.web import formfields as ff, formwidgets as fw
from cubicweb.web.views import ajaxcontroller
from cubicweb.web.views import ajaxcontroller, formrenderers
class ConceptOrTextField(ff.Field):
......@@ -160,3 +162,15 @@ def scheme_concepts_autocomplete(self):
'DISTINCT Any C,N ORDERBY N LIMIT %s WHERE C in_scheme S, S eid %%(s)s, '
'C preferred_label L, L label N, L label ILIKE %%(term)s' % limit,
{'s': scheme, 'term': u'%%%s%%' % term})]
def render_title(self, w, form, values):
"""Monkey-patched to remove counter"""
w(u'<div class="iformTitle">')
w(u'<span>%(title)s</span>' % values)
if values['removejs']:
values['removemsg'] = self._cw.__('remove-inlined-entity-form')
w(u' [<a href="javascript: %(removejs)s;$.noop();">%(removemsg)s</a>]'
% values)
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