19 specified_etype_implements, yes) |
19 specified_etype_implements, yes) |
20 from cubicweb.utils import make_uid, compute_cardinality, get_schema_property |
20 from cubicweb.utils import make_uid, compute_cardinality, get_schema_property |
21 from cubicweb.view import EntityView |
21 from cubicweb.view import EntityView |
22 from cubicweb.common import tags |
22 from cubicweb.common import tags |
23 from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs, eid_param, uicfg |
23 from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs, eid_param, uicfg |
24 from cubicweb.web.form import FormViewMixIn |
24 from cubicweb.web.form import FormViewMixIn, FieldNotFound |
25 from cubicweb.web.formfields import guess_field |
25 from cubicweb.web.formfields import guess_field |
26 from cubicweb.web.formwidgets import Button, SubmitButton, ResetButton |
26 from cubicweb.web.formwidgets import Button, SubmitButton, ResetButton |
27 from cubicweb.web.views import forms |
27 from cubicweb.web.views import forms |
28 |
28 |
29 |
29 |
247 row=row, col=col, form_buttons=buttons, |
247 row=row, col=col, form_buttons=buttons, |
248 attrcategories=self.attrcategories, |
248 attrcategories=self.attrcategories, |
249 domid='%s-form' % divid, action='#', |
249 domid='%s-form' % divid, action='#', |
250 cssstyle='display: none', |
250 cssstyle='display: none', |
251 onsubmit=onsubmit % event_data) |
251 onsubmit=onsubmit % event_data) |
|
252 try: |
|
253 field = form.field_by_name(rtype, role) |
|
254 except FieldNotFound: |
|
255 self.w(value) |
|
256 return |
252 w = self.w |
257 w = self.w |
253 w(u'<div class="field">') |
258 w(u'<div class="field">') |
254 w(u'<div id="%s" style="display: inline">' % divid) |
259 w(u'<div id="%s" style="display: inline">' % divid) |
255 w(tags.div(lzone, klass='editableField', |
260 w(tags.div(lzone, klass='editableField', |
256 onclick=self._onclick % event_data)) |
261 onclick=self._onclick % event_data)) |