web/views/autoform.py
changeset 3655 af86ab65a282
parent 3629 559cad62c786
child 3720 5376aaadd16b
--- a/web/views/autoform.py	Tue Oct 13 12:04:36 2009 +0200
+++ b/web/views/autoform.py	Tue Oct 13 15:59:05 2009 +0200
@@ -360,35 +360,46 @@
 
 ## default form ui configuration ##############################################
 
+_afs = uicfg.autoform_section
 # use primary and not generated for eid since it has to be an hidden
-uicfg.autoform_section.tag_attribute(('*', 'eid'), 'primary')
-uicfg.autoform_section.tag_attribute(('*', 'description'), 'secondary')
-uicfg.autoform_section.tag_attribute(('*', 'creation_date'), 'metadata')
-uicfg.autoform_section.tag_attribute(('*', 'modification_date'), 'metadata')
-uicfg.autoform_section.tag_attribute(('*', 'cwuri'), 'metadata')
-uicfg.autoform_section.tag_attribute(('*', 'has_text'), 'generated')
-uicfg.autoform_section.tag_subject_of(('*', 'in_state', '*'), 'generated')
-uicfg.autoform_section.tag_subject_of(('*', 'owned_by', '*'), 'metadata')
-uicfg.autoform_section.tag_subject_of(('*', 'created_by', '*'), 'metadata')
-uicfg.autoform_section.tag_subject_of(('*', 'require_permission', '*'), 'generated')
-uicfg.autoform_section.tag_subject_of(('*', 'by_transition', '*'), 'primary')
-uicfg.autoform_section.tag_object_of(('*', 'by_transition', '*'), 'generated')
-uicfg.autoform_section.tag_object_of(('*', 'from_state', '*'), 'generated')
-uicfg.autoform_section.tag_object_of(('*', 'to_state', '*'), 'generated')
-uicfg.autoform_section.tag_subject_of(('*', 'wf_info_for', '*'), 'primary')
-uicfg.autoform_section.tag_object_of(('*', 'wf_info_for', '*'), 'generated')
-uicfg.autoform_section.tag_subject_of(('*', 'for_user', '*'), 'generated')
-uicfg.autoform_section.tag_object_of(('*', 'for_user', '*'), 'generated')
-uicfg.autoform_section.tag_subject_of(('CWPermission', 'require_group', '*'), 'primary')
-uicfg.autoform_section.tag_attribute(('CWEType', 'final'), 'generated')
-uicfg.autoform_section.tag_attribute(('CWRType', 'final'), 'generated')
-uicfg.autoform_section.tag_attribute(('CWUser', 'firstname'), 'secondary')
-uicfg.autoform_section.tag_attribute(('CWUser', 'surname'), 'secondary')
-uicfg.autoform_section.tag_attribute(('CWUser', 'last_login_time'), 'metadata')
-uicfg.autoform_section.tag_subject_of(('CWUser', 'in_group', '*'), 'primary')
-uicfg.autoform_section.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'metadata')
-uicfg.autoform_section.tag_attribute(('Bookmark', 'path'), 'primary')
-uicfg.autoform_section.tag_subject_of(('*', 'primary_email', '*'), 'generic')
+_afs.tag_attribute(('*', 'eid'), 'main', 'attributes')
+_afs.tag_attribute(('*', 'eid'), 'muledit', 'attributes')
+_afs.tag_attribute(('*', 'description'), 'main', 'attributes')
+_afs.tag_attribute(('*', 'creation_date'), 'main', 'metadata')
+_afs.tag_attribute(('*', 'modification_date'), 'main', 'metadata')
+_afs.tag_attribute(('*', 'cwuri'), 'main', 'metadata')
+_afs.tag_attribute(('*', 'has_text'), 'main', 'hidden')
+_afs.tag_subject_of(('*', 'in_state', '*'), 'main', 'hidden')
+_afs.tag_subject_of(('*', 'owned_by', '*'), 'main', 'metadata')
+_afs.tag_subject_of(('*', 'created_by', '*'), 'main', 'metadata')
+_afs.tag_subject_of(('*', 'require_permission', '*'), 'main', 'hidden')
+_afs.tag_subject_of(('*', 'by_transition', '*'), 'main', 'attributes')
+_afs.tag_subject_of(('*', 'by_transition', '*'), 'muledit', 'attributes')
+_afs.tag_object_of(('*', 'by_transition', '*'), 'main', 'hidden')
+_afs.tag_object_of(('*', 'from_state', '*'), 'main', 'hidden')
+_afs.tag_object_of(('*', 'to_state', '*'), 'main', 'hidden')
+_afs.tag_subject_of(('*', 'wf_info_for', '*'), 'main', 'attributes')
+_afs.tag_subject_of(('*', 'wf_info_for', '*'), 'muledit', 'attributes')
+_afs.tag_object_of(('*', 'wf_info_for', '*'), 'main', 'hidden')
+_afs.tag_subject_of(('*', 'for_user', '*'), 'main', 'hidden')
+_afs.tag_object_of(('*', 'for_user', '*'), 'main', 'hidden')
+_afs.tag_subject_of(('CWPermission', 'require_group', '*'), 'main', 'attributes')
+_afs.tag_subject_of(('CWPermission', 'require_group', '*'), 'muledit', 'attributes')
+_afs.tag_attribute(('CWEType', 'final'), 'main', 'hidden')
+_afs.tag_attribute(('CWRType', 'final'), 'main', 'hidden')
+_afs.tag_attribute(('CWUser', 'firstname'), 'main', 'attributes')
+_afs.tag_attribute(('CWUser', 'surname'), 'main', 'attributes')
+_afs.tag_attribute(('CWUser', 'last_login_time'), 'main', 'metadata')
+_afs.tag_subject_of(('CWUser', 'in_group', '*'), 'main', 'attributes')
+_afs.tag_subject_of(('CWUser', 'in_group', '*'), 'muledit', 'attributes')
+_afs.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'main', 'metadata')
+_afs.tag_attribute(('Bookmark', 'path'), 'main', 'attributes')
+_afs.tag_attribute(('Bookmark', 'path'), 'muledit', 'attributes')
+_afs.tag_subject_of(('*', 'primary_email', '*'), 'main', 'relations')
+_afs.tag_subject_of(('*', 'use_email', '*'), 'main', 'inlined')
+_afs.tag_subject_of(('CWRelation', 'relation_type', '*'), 'main', 'inlined')
+_afs.tag_subject_of(('CWRelation', 'from_entity', '*'), 'main', 'inlined')
+_afs.tag_subject_of(('CWRelation', 'to_entity', '*'), 'main', 'inlined')
 
 uicfg.autoform_field_kwargs.tag_attribute(('RQLExpression', 'expression'),
                                           {'widget': fwdgs.TextInput})
@@ -396,8 +407,3 @@
                                           {'widget': fwdgs.TextInput})
 uicfg.autoform_field_kwargs.tag_subject_of(('TrInfo', 'wf_info_for', '*'),
                                            {'widget': fwdgs.HiddenInput})
-
-uicfg.autoform_is_inlined.tag_subject_of(('*', 'use_email', '*'), True)
-uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'relation_type', '*'), True)
-uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'from_entity', '*'), True)
-uicfg.autoform_is_inlined.tag_subject_of(('CWRelation', 'to_entity', '*'), True)