358 return AutomaticEntityForm.field_by_name(rtype, role, eschema) |
358 return AutomaticEntityForm.field_by_name(rtype, role, eschema) |
359 |
359 |
360 |
360 |
361 ## default form ui configuration ############################################## |
361 ## default form ui configuration ############################################## |
362 |
362 |
|
363 _afs = uicfg.autoform_section |
363 # use primary and not generated for eid since it has to be an hidden |
364 # use primary and not generated for eid since it has to be an hidden |
364 uicfg.autoform_section.tag_attribute(('*', 'eid'), 'primary') |
365 _afs.tag_attribute(('*', 'eid'), 'main', 'attributes') |
365 uicfg.autoform_section.tag_attribute(('*', 'description'), 'secondary') |
366 _afs.tag_attribute(('*', 'eid'), 'muledit', 'attributes') |
366 uicfg.autoform_section.tag_attribute(('*', 'creation_date'), 'metadata') |
367 _afs.tag_attribute(('*', 'description'), 'main', 'attributes') |
367 uicfg.autoform_section.tag_attribute(('*', 'modification_date'), 'metadata') |
368 _afs.tag_attribute(('*', 'creation_date'), 'main', 'metadata') |
368 uicfg.autoform_section.tag_attribute(('*', 'cwuri'), 'metadata') |
369 _afs.tag_attribute(('*', 'modification_date'), 'main', 'metadata') |
369 uicfg.autoform_section.tag_attribute(('*', 'has_text'), 'generated') |
370 _afs.tag_attribute(('*', 'cwuri'), 'main', 'metadata') |
370 uicfg.autoform_section.tag_subject_of(('*', 'in_state', '*'), 'generated') |
371 _afs.tag_attribute(('*', 'has_text'), 'main', 'hidden') |
371 uicfg.autoform_section.tag_subject_of(('*', 'owned_by', '*'), 'metadata') |
372 _afs.tag_subject_of(('*', 'in_state', '*'), 'main', 'hidden') |
372 uicfg.autoform_section.tag_subject_of(('*', 'created_by', '*'), 'metadata') |
373 _afs.tag_subject_of(('*', 'owned_by', '*'), 'main', 'metadata') |
373 uicfg.autoform_section.tag_subject_of(('*', 'require_permission', '*'), 'generated') |
374 _afs.tag_subject_of(('*', 'created_by', '*'), 'main', 'metadata') |
374 uicfg.autoform_section.tag_subject_of(('*', 'by_transition', '*'), 'primary') |
375 _afs.tag_subject_of(('*', 'require_permission', '*'), 'main', 'hidden') |
375 uicfg.autoform_section.tag_object_of(('*', 'by_transition', '*'), 'generated') |
376 _afs.tag_subject_of(('*', 'by_transition', '*'), 'main', 'attributes') |
376 uicfg.autoform_section.tag_object_of(('*', 'from_state', '*'), 'generated') |
377 _afs.tag_subject_of(('*', 'by_transition', '*'), 'muledit', 'attributes') |
377 uicfg.autoform_section.tag_object_of(('*', 'to_state', '*'), 'generated') |
378 _afs.tag_object_of(('*', 'by_transition', '*'), 'main', 'hidden') |
378 uicfg.autoform_section.tag_subject_of(('*', 'wf_info_for', '*'), 'primary') |
379 _afs.tag_object_of(('*', 'from_state', '*'), 'main', 'hidden') |
379 uicfg.autoform_section.tag_object_of(('*', 'wf_info_for', '*'), 'generated') |
380 _afs.tag_object_of(('*', 'to_state', '*'), 'main', 'hidden') |
380 uicfg.autoform_section.tag_subject_of(('*', 'for_user', '*'), 'generated') |
381 _afs.tag_subject_of(('*', 'wf_info_for', '*'), 'main', 'attributes') |
381 uicfg.autoform_section.tag_object_of(('*', 'for_user', '*'), 'generated') |
382 _afs.tag_subject_of(('*', 'wf_info_for', '*'), 'muledit', 'attributes') |
382 uicfg.autoform_section.tag_subject_of(('CWPermission', 'require_group', '*'), 'primary') |
383 _afs.tag_object_of(('*', 'wf_info_for', '*'), 'main', 'hidden') |
383 uicfg.autoform_section.tag_attribute(('CWEType', 'final'), 'generated') |
384 _afs.tag_subject_of(('*', 'for_user', '*'), 'main', 'hidden') |
384 uicfg.autoform_section.tag_attribute(('CWRType', 'final'), 'generated') |
385 _afs.tag_object_of(('*', 'for_user', '*'), 'main', 'hidden') |
385 uicfg.autoform_section.tag_attribute(('CWUser', 'firstname'), 'secondary') |
386 _afs.tag_subject_of(('CWPermission', 'require_group', '*'), 'main', 'attributes') |
386 uicfg.autoform_section.tag_attribute(('CWUser', 'surname'), 'secondary') |
387 _afs.tag_subject_of(('CWPermission', 'require_group', '*'), 'muledit', 'attributes') |
387 uicfg.autoform_section.tag_attribute(('CWUser', 'last_login_time'), 'metadata') |
388 _afs.tag_attribute(('CWEType', 'final'), 'main', 'hidden') |
388 uicfg.autoform_section.tag_subject_of(('CWUser', 'in_group', '*'), 'primary') |
389 _afs.tag_attribute(('CWRType', 'final'), 'main', 'hidden') |
389 uicfg.autoform_section.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'metadata') |
390 _afs.tag_attribute(('CWUser', 'firstname'), 'main', 'attributes') |
390 uicfg.autoform_section.tag_attribute(('Bookmark', 'path'), 'primary') |
391 _afs.tag_attribute(('CWUser', 'surname'), 'main', 'attributes') |
391 uicfg.autoform_section.tag_subject_of(('*', 'primary_email', '*'), 'generic') |
392 _afs.tag_attribute(('CWUser', 'last_login_time'), 'main', 'metadata') |
|
393 _afs.tag_subject_of(('CWUser', 'in_group', '*'), 'main', 'attributes') |
|
394 _afs.tag_subject_of(('CWUser', 'in_group', '*'), 'muledit', 'attributes') |
|
395 _afs.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'main', 'metadata') |
|
396 _afs.tag_attribute(('Bookmark', 'path'), 'main', 'attributes') |
|
397 _afs.tag_attribute(('Bookmark', 'path'), 'muledit', 'attributes') |
|
398 _afs.tag_subject_of(('*', 'primary_email', '*'), 'main', 'relations') |
|
399 _afs.tag_subject_of(('*', 'use_email', '*'), 'main', 'inlined') |
|
400 _afs.tag_subject_of(('CWRelation', 'relation_type', '*'), 'main', 'inlined') |
|
401 _afs.tag_subject_of(('CWRelation', 'from_entity', '*'), 'main', 'inlined') |
|
402 _afs.tag_subject_of(('CWRelation', 'to_entity', '*'), 'main', 'inlined') |
392 |
403 |
393 uicfg.autoform_field_kwargs.tag_attribute(('RQLExpression', 'expression'), |
404 uicfg.autoform_field_kwargs.tag_attribute(('RQLExpression', 'expression'), |
394 {'widget': fwdgs.TextInput}) |
405 {'widget': fwdgs.TextInput}) |
395 uicfg.autoform_field_kwargs.tag_attribute(('Bookmark', 'path'), |
406 uicfg.autoform_field_kwargs.tag_attribute(('Bookmark', 'path'), |
396 {'widget': fwdgs.TextInput}) |
407 {'widget': fwdgs.TextInput}) |
397 uicfg.autoform_field_kwargs.tag_subject_of(('TrInfo', 'wf_info_for', '*'), |
408 uicfg.autoform_field_kwargs.tag_subject_of(('TrInfo', 'wf_info_for', '*'), |
398 {'widget': fwdgs.HiddenInput}) |
409 {'widget': fwdgs.HiddenInput}) |
399 |
|
400 uicfg.autoform_is_inlined.tag_subject_of(('*', 'use_email', '*'), True) |
|
401 uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'relation_type', '*'), True) |
|
402 uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'from_entity', '*'), True) |
|
403 uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'to_entity', '*'), True) |
|