web/views/bookmark.py
changeset 4306 01e5efc0d823
parent 4252 6c4f109c2b03
child 4309 bdac9e9e76cd
--- a/web/views/bookmark.py	Thu Jan 21 10:47:01 2010 +0100
+++ b/web/views/bookmark.py	Thu Jan 21 10:48:00 2010 +0100
@@ -12,13 +12,22 @@
 from cubicweb import Unauthorized
 from cubicweb.selectors import implements, one_line_rset
 from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, RawBoxItem
-from cubicweb.web import action, box, uicfg
+from cubicweb.web import action, box, uicfg, formwidgets as fw
 from cubicweb.web.views import primary
 
 _abaa = uicfg.actionbox_appearsin_addmenu
 _abaa.tag_subject_of(('*', 'bookmarked_by', '*'), False)
 _abaa.tag_object_of(('*', 'bookmarked_by', '*'), False)
 
+_afs = uicfg.autoform_section
+_afs.tag_object_of(('*', 'bookmarked_by', 'CWUser'), 'main', 'metadata')
+_afs.tag_attribute(('Bookmark', 'path'), 'main', 'attributes')
+_afs.tag_attribute(('Bookmark', 'path'), 'muledit', 'attributes')
+
+_affk = uicfg.autoform_field_kwargs
+_affk.tag_attribute(('Bookmark', 'path'), {'widget': fw.URLUnescapedInput})
+
+
 class FollowAction(action.Action):
     __regid__ = 'follow'
     __select__ = one_line_rset() & implements('Bookmark')