724 # which relations should be edited |
724 # which relations should be edited |
725 display_fields = None |
725 display_fields = None |
726 # action on the form tag |
726 # action on the form tag |
727 _default_form_action_path = 'validateform' |
727 _default_form_action_path = 'validateform' |
728 |
728 |
729 # pre 3.8.3 compat |
729 @deprecated('[3.18] you should override form_action()') |
730 def set_action(self, action): |
730 def set_action(self, action): |
731 self._action = action |
731 self._action = action |
|
732 |
|
733 @deprecated('[3.18] use form_action()') |
732 def get_action(self): |
734 def get_action(self): |
733 try: |
735 try: |
734 return self._action |
736 return self._action |
735 except AttributeError: |
737 except AttributeError: |
736 return self._cw.build_url(self._default_form_action_path) |
738 return self._cw.build_url(self._default_form_action_path) |
737 action = property(deprecated('[3.9] use form.form_action()')(get_action), |
739 |
738 set_action) |
|
739 |
740 |
740 @iclassmethod |
741 @iclassmethod |
741 def field_by_name(cls_or_self, name, role=None, eschema=None): |
742 def field_by_name(cls_or_self, name, role=None, eschema=None): |
742 """return field with the given name and role. If field is not explicitly |
743 """return field with the given name and role. If field is not explicitly |
743 defined for the form but `eclass` is specified, guess_field will be |
744 defined for the form but `eclass` is specified, guess_field will be |