web/views/baseforms.py
branchtls-sprint
changeset 1154 9b23a6836c32
parent 1138 22f634977c95
child 1181 620ec8e6ae19
--- a/web/views/baseforms.py	Thu Mar 26 20:54:40 2009 +0100
+++ b/web/views/baseforms.py	Thu Mar 26 21:03:20 2009 +0100
@@ -21,6 +21,7 @@
 from cubicweb.web.controller import NAV_FORM_PARAMETERS
 from cubicweb.web.widgets import checkbox, InputWidget, ComboBoxWidget
 from cubicweb.web.form import FormMixIn
+from cubicweb.web.views.editforms import AutomaticEntityForm
 
 _ = unicode
     
@@ -326,7 +327,7 @@
     # should_* method extracted to allow overriding
     
     def should_inline_relation_form(self, entity, rschema, targettype, role):
-        return entity.rtags.is_inlined(rschema, targettype, role)
+        return AutomaticForm.rinlined.etype_rtag(entity.id, role, rschema, targettype)
 
     def should_display_inline_relation_form(self, rschema, existant, card):
         return not existant and card in '1+'
@@ -428,7 +429,7 @@
     def should_inline_relation_form(self, entity, rschema, targettype, role):
         if rschema == self.rschema:
             return False
-        return entity.rtags.is_inlined(rschema, targettype, role)
+        return AutomaticForm.rinlined.etype_rtag(entity.id, role, rschema, targettype)
 
     @cached
     def keep_entity(self, entity):