equal
deleted
inserted
replaced
527 needs_multipart = True |
527 needs_multipart = True |
528 |
528 |
529 class HiddenInitialValueField(Field): |
529 class HiddenInitialValueField(Field): |
530 def __init__(self, visible_field, name): |
530 def __init__(self, visible_field, name): |
531 super(HiddenInitialValueField, self).__init__(name=name, |
531 super(HiddenInitialValueField, self).__init__(name=name, |
532 widget=HiddenInput) |
532 widget=HiddenInput, |
|
533 eidparam=True) |
533 self.visible_field = visible_field |
534 self.visible_field = visible_field |
534 |
535 |
535 |
536 |
536 class RelationField(Field): |
537 class RelationField(Field): |
537 def __init__(self, role='subject', **kwargs): |
538 def __init__(self, role='subject', **kwargs): |
676 # to describe attribute fields => role is 'subject' |
677 # to describe attribute fields => role is 'subject' |
677 if getattr(field, 'role', 'subject') == 'subject': |
678 if getattr(field, 'role', 'subject') == 'subject': |
678 name = 'edits-%s' % field.name |
679 name = 'edits-%s' % field.name |
679 else: |
680 else: |
680 name = 'edito-%s' % field.name |
681 name = 'edito-%s' % field.name |
681 return HiddenInitialValueField(field, name=name, eidparam=True) |
682 return HiddenInitialValueField(field, name=name) |
682 |
683 |
683 def form_field_value(self, field, values): |
684 def form_field_value(self, field, values): |
684 """look for field's value with the following rules: |
685 """look for field's value with the following rules: |
685 1. handle special __type and eid fields |
686 1. handle special __type and eid fields |
686 2. looks in kw args given to render_form (including previously submitted |
687 2. looks in kw args given to render_form (including previously submitted |