diff -r 5b75fd66c80e -r d7a270f50f54 web/views/editforms.py --- a/web/views/editforms.py Sun Nov 08 21:53:18 2009 +0100 +++ b/web/views/editforms.py Fri Nov 20 19:35:54 2009 +0100 @@ -51,8 +51,8 @@ domid = 'deleteconf' copy_nav_params = True - form_buttons = [Button(stdmsgs.YES, cwaction='delete'), - Button(stdmsgs.NO, cwaction='cancel')] + form_buttons = [Button(stdmsgs.BUTTON_DELETE, cwaction='delete'), + Button(stdmsgs.BUTTON_CANCEL, cwaction='cancel')] @property def action(self): return self._cw.build_url('edit') @@ -113,7 +113,7 @@ _onsubmit = ("return inlineValidateRelationForm('%(rtype)s', '%(role)s', '%(eid)s', " "'%(divid)s', %(reload)s, '%(vid)s', '%(default)s', '%(lzone)s');") _cancelclick = "hideInlineEdit(%s,\'%s\',\'%s\')" - _defaultlandingzone = (u'') _landingzonemsg = _('click to edit this field') # default relation vids according to cardinality @@ -197,14 +197,17 @@ """ w = self.w divid = form.event_args['divid'] - w(u'
' % form.event_args['divid']) - w(u'
' % ( + w(u'
' + % (divid, divid, divid)) + w(u'
%s
' % (divid, value)) + w(form.form_render(renderer=renderer)) + w(u'') - w(u'
%s
' % (divid, value)) - w(form.form_render(renderer=renderer)) w(u'
') def _compute_best_vid(self, eschema, rschema, role): @@ -269,10 +272,8 @@ dispctrl = uicfg.primaryview_display_ctrl.etype_get(eschema, rtype, role) vid = dispctrl.get('vid', 'reledit') if vid != 'reledit': # reledit explicitly disabled - self.wview(vid, entity.related(rtype, role), 'null') return False if eschema.role_rproperty(role, rschema, 'composite') == role: - self.wview(rvid, entity.related(rtype, role), 'null') return False return super(AutoClickAndEditFormView, self).should_edit_relation( entity, rschema, role, rvid) @@ -426,6 +427,7 @@ form = self._cw.vreg['forms'].select('edition', self._cw, rset=self.cw_rset, row=row, formtype='muledit', + copy_nav_params=False, mainform=False) # XXX rely on the EntityCompositeFormRenderer to put the eid input form.remove_field(form.field_by_name('eid')) @@ -442,7 +444,9 @@ should be the eid """ #self.form_title(entity) - form = self._cw.vreg['forms'].select(self.__regid__, self._cw, rset=self.cw_rset) + form = self._cw.vreg['forms'].select(self.__regid__, self._cw, + rset=self.cw_rset, + copy_nav_params=True) self.w(form.form_render()) @@ -577,4 +581,3 @@ self.w(u'+ %s.' % (self.rtype, self.peid, js, __(i18nctx, 'add a %s' % self.etype))) self.w(u'
') - self.w(u'
 
')