web/views/cwuser.py
branchstable
changeset 6891 e409a012c505
parent 6582 8eb7883b4223
child 6950 8a17e6e34f0f
--- a/web/views/cwuser.py	Tue Jan 25 12:50:56 2011 +0100
+++ b/web/views/cwuser.py	Wed Jan 26 09:32:34 2011 +0100
@@ -26,7 +26,7 @@
 
 from cubicweb.selectors import one_line_rset, is_instance, match_user_groups
 from cubicweb.view import EntityView
-from cubicweb.web import action, uicfg
+from cubicweb.web import action, uicfg, formwidgets
 from cubicweb.web.views import tabs
 
 _pvs = uicfg.primaryview_section
@@ -39,6 +39,11 @@
 _pvs.tag_object_of(('*', 'in_group', 'CWGroup'), 'relations')
 _pvs.tag_object_of(('*', 'require_group', 'CWGroup'), 'relations')
 
+_affk = uicfg.autoform_field_kwargs
+
+_affk.tag_subject_of(('CWUser', 'in_group', 'CWGroup'),
+                    {'widget': formwidgets.InOutWidget})
+
 class UserPreferencesEntityAction(action.Action):
     __regid__ = 'prefs'
     __select__ = (one_line_rset() & is_instance('CWUser') &