web/views/basecontrollers.py
changeset 3369 7b88d12b4ee2
parent 3293 69c0ba095536
parent 3343 383b42263bb1
child 3377 dd9d292b6a6d
--- a/web/views/basecontrollers.py	Thu Sep 17 15:52:46 2009 +0200
+++ b/web/views/basecontrollers.py	Tue Sep 22 12:11:12 2009 +0200
@@ -213,12 +213,13 @@
     def response(self, domid, status, args, entity):
         callback = str(self.req.form.get('__onsuccess', 'null'))
         errback = str(self.req.form.get('__onfailure', 'null'))
+        cbargs = str(self.req.form.get('__cbargs', 'null'))
         self.req.set_content_type('text/html')
         jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder)
         return """<script type="text/javascript">
  wp = window.parent;
- window.parent.handleFormValidationResponse('%s', %s, %s, %s);
-</script>""" %  (domid, callback, errback, jsargs)
+ window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s);
+</script>""" %  (domid, callback, errback, jsargs, cbargs)
 
     def publish(self, rset=None):
         self.req.json_request = True
@@ -376,12 +377,12 @@
 
     @check_pageid
     @xhtmlize
-    def js_inline_creation_form(self, peid, ttype, rtype, role):
+    def js_inline_creation_form(self, peid, ttype, rtype, role, i18nctx):
         view = self.vreg['views'].select('inline-creation', self.req,
                                          etype=ttype, peid=peid, rtype=rtype,
                                          role=role)
         return self._call_view(view, etype=ttype, peid=peid,
-                               rtype=rtype, role=role)
+                               rtype=rtype, role=role, i18nctx=i18nctx)
 
     @jsonize
     def js_validate_form(self, action, names, values):