web/views/baseforms.py
branchtls-sprint
changeset 1066 3cebd690a114
parent 1053 e4d965b5ca37
child 1084 98cd7c5cea4c
--- a/web/views/baseforms.py	Wed Mar 11 19:50:05 2009 +0100
+++ b/web/views/baseforms.py	Wed Mar 11 19:50:33 2009 +0100
@@ -75,6 +75,7 @@
 
 class ChangeStateForm(EntityFieldsForm):
     id = 'changestate'
+    
     __method = StringField(name='__method', initial='set_state', widget=HiddenInput)
     state = StringField(widget=HiddenInput, eidparam=True)
     trcomment = RichTextField(eidparam=True)
@@ -100,7 +101,7 @@
         self.req.add_js('cubicweb.edition.js')
         self.req.add_css('cubicweb.form.css')
         _ = self.req._
-        form = self.select_object('forms', 'changestate', self.req, self.rset, row, col,
+        form = self.vreg.select_object('forms', 'changestate', self.req, self.rset, row, col,
                                   entity=entity, redirect_path=self.redirectpath(entity))
         self.w(form.error_message())
         self.w(u'<h4>%s %s</h4>\n' % (_(transition.name), entity.view('oneline')))