web/formfields.py
changeset 3589 a5432f99f2d9
parent 3536 f6c9a5df80fb
parent 3575 4123323acaea
child 3720 5376aaadd16b
equal deleted inserted replaced
3536:f6c9a5df80fb 3589:a5432f99f2d9
   596         targetschema = rschema.subjects(eschema)[0]
   596         targetschema = rschema.subjects(eschema)[0]
   597         help = rschema.rproperty(targetschema, eschema, 'description')
   597         help = rschema.rproperty(targetschema, eschema, 'description')
   598     kwargs['required'] = card in '1+'
   598     kwargs['required'] = card in '1+'
   599     kwargs['name'] = rschema.type
   599     kwargs['name'] = rschema.type
   600     if role == 'object':
   600     if role == 'object':
   601         kwargs['label'] = (eschema.type + '_object', rschema.type)
   601         kwargs.setdefault('label', (eschema.type, rschema.type + '_object'))
   602     else:
   602     else:
   603         kwargs['label'] = (eschema.type, rschema.type)
   603         kwargs.setdefault('label', (eschema.type, rschema.type))
   604     kwargs['eidparam'] = True
   604     kwargs['eidparam'] = True
   605     kwargs.setdefault('help', help)
   605     kwargs.setdefault('help', help)
   606     if rschema.is_final():
   606     if rschema.is_final():
   607         if skip_meta_attr and rschema in eschema.meta_attributes():
   607         if skip_meta_attr and rschema in eschema.meta_attributes():
   608             return None
   608             return None