equal
deleted
inserted
replaced
592 def get_default(form, es=eschema, rs=rschema): |
592 def get_default(form, es=eschema, rs=rschema): |
593 return es.default(rs) |
593 return es.default(rs) |
594 kwargs.setdefault('initial', get_default) |
594 kwargs.setdefault('initial', get_default) |
595 else: |
595 else: |
596 targetschema = rdef.subject |
596 targetschema = rdef.subject |
597 kwargs['required'] = rdef.role_cardinality(role) in '1+' |
597 card = rdef.role_cardinality(role) |
|
598 kwargs['required'] = card in '1+' |
598 kwargs['name'] = rschema.type |
599 kwargs['name'] = rschema.type |
599 if role == 'object': |
600 if role == 'object': |
600 kwargs.setdefault('label', (eschema.type, rschema.type + '_object')) |
601 kwargs.setdefault('label', (eschema.type, rschema.type + '_object')) |
601 else: |
602 else: |
602 kwargs.setdefault('label', (eschema.type, rschema.type)) |
603 kwargs.setdefault('label', (eschema.type, rschema.type)) |