--- 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):