80 super(FieldsForm, self).__init__(req, rset=rset, row=row, col=col) |
80 super(FieldsForm, self).__init__(req, rset=rset, row=row, col=col) |
81 self.fields = list(self.__class__._fields_) |
81 self.fields = list(self.__class__._fields_) |
82 for key, val in kwargs.items(): |
82 for key, val in kwargs.items(): |
83 if key in NAV_FORM_PARAMETERS: |
83 if key in NAV_FORM_PARAMETERS: |
84 self.form_add_hidden(key, val) |
84 self.form_add_hidden(key, val) |
85 else: |
85 elif hasattr(self.__class__, key) and not key[0] == '_': |
86 assert hasattr(self.__class__, key) and not key[0] == '_', key |
|
87 setattr(self, key, val) |
86 setattr(self, key, val) |
|
87 # skip other parameters, usually given for selection |
|
88 # (else write a custom class to handle them) |
88 if mainform: |
89 if mainform: |
89 self.form_add_hidden('__errorurl', self.session_key()) |
90 self.form_add_hidden('__errorurl', self.session_key()) |
90 self.form_add_hidden('__domid', self.domid) |
91 self.form_add_hidden('__domid', self.domid) |
91 if self.copy_nav_params: |
92 if self.copy_nav_params: |
92 for param in NAV_FORM_PARAMETERS: |
93 for param in NAV_FORM_PARAMETERS: |
528 rsetsize, done) |
529 rsetsize, done) |
529 if limit is not None and len(result) >= limit: |
530 if limit is not None and len(result) >= limit: |
530 break |
531 break |
531 return result |
532 return result |
532 |
533 |
533 def srelations_by_category(self, categories=None, permission=None): |
534 def srelations_by_category(self, categories=None, permission=None, |
|
535 strict=False): |
534 return () |
536 return () |
535 |
537 |
536 def should_display_add_new_relation_link(self, rschema, existant, card): |
538 def should_display_add_new_relation_link(self, rschema, existant, card): |
537 return False |
539 return False |
538 |
540 |