equal
deleted
inserted
replaced
325 return '\n'.join(result) |
325 return '\n'.join(result) |
326 |
326 |
327 # should_* method extracted to allow overriding |
327 # should_* method extracted to allow overriding |
328 |
328 |
329 def should_inline_relation_form(self, entity, rschema, targettype, role): |
329 def should_inline_relation_form(self, entity, rschema, targettype, role): |
330 return AutomaticForm.rinlined.etype_rtag(entity.id, role, rschema, targettype) |
330 return AutomaticForm.rinlined.etype_rtag(entity.id, rschema, role, targettype) |
331 |
331 |
332 def should_display_inline_relation_form(self, rschema, existant, card): |
332 def should_display_inline_relation_form(self, rschema, existant, card): |
333 return not existant and card in '1+' |
333 return not existant and card in '1+' |
334 |
334 |
335 def should_display_add_inline_relation_link(self, rschema, existant, card): |
335 def should_display_add_inline_relation_link(self, rschema, existant, card): |
427 super(InlineFormMixIn, self).edit_form(entity, kwargs) |
427 super(InlineFormMixIn, self).edit_form(entity, kwargs) |
428 |
428 |
429 def should_inline_relation_form(self, entity, rschema, targettype, role): |
429 def should_inline_relation_form(self, entity, rschema, targettype, role): |
430 if rschema == self.rschema: |
430 if rschema == self.rschema: |
431 return False |
431 return False |
432 return AutomaticForm.rinlined.etype_rtag(entity.id, role, rschema, targettype) |
432 return AutomaticForm.rinlined.etype_rtag(entity.id, rschema, role, targettype) |
433 |
433 |
434 @cached |
434 @cached |
435 def keep_entity(self, entity): |
435 def keep_entity(self, entity): |
436 req = self.req |
436 req = self.req |
437 # are we regenerating form because of a validation error ? |
437 # are we regenerating form because of a validation error ? |