equal
deleted
inserted
replaced
318 return '\n'.join(result) |
318 return '\n'.join(result) |
319 |
319 |
320 # should_* method extracted to allow overriding |
320 # should_* method extracted to allow overriding |
321 |
321 |
322 def should_inline_relation_form(self, entity, rschema, targettype, role): |
322 def should_inline_relation_form(self, entity, rschema, targettype, role): |
323 return AutomaticEntityForm.rinlined.etype_rtag(entity.id, rschema, role, |
323 return AutomaticEntityForm.rinlined.etype_get(entity.id, rschema, role, |
324 targettype) |
324 targettype) |
325 |
325 |
326 def should_display_inline_relation_form(self, rschema, existant, card): |
326 def should_display_inline_relation_form(self, rschema, existant, card): |
327 return not existant and card in '1+' |
327 return not existant and card in '1+' |
328 |
328 |
329 def should_display_add_inline_relation_link(self, rschema, existant, card): |
329 def should_display_add_inline_relation_link(self, rschema, existant, card): |
421 super(InlineFormMixIn, self).edit_form(entity, kwargs) |
421 super(InlineFormMixIn, self).edit_form(entity, kwargs) |
422 |
422 |
423 def should_inline_relation_form(self, entity, rschema, targettype, role): |
423 def should_inline_relation_form(self, entity, rschema, targettype, role): |
424 if rschema == self.rschema: |
424 if rschema == self.rschema: |
425 return False |
425 return False |
426 return AutomaticEntityForm.rinlined.etype_rtag(entity.id, rschema, role, |
426 return AutomaticEntityForm.rinlined.etype_get(entity.id, rschema, role, |
427 targettype) |
427 targettype) |
428 |
428 |
429 @cached |
429 @cached |
430 def keep_entity(self, entity): |
430 def keep_entity(self, entity): |
431 req = self.req |
431 req = self.req |
432 # are we regenerating form because of a validation error ? |
432 # are we regenerating form because of a validation error ? |