237 errback = str(self._cw.form.get('__onfailure', 'null')) |
237 errback = str(self._cw.form.get('__onfailure', 'null')) |
238 cbargs = str(self._cw.form.get('__cbargs', 'null')) |
238 cbargs = str(self._cw.form.get('__cbargs', 'null')) |
239 self._cw.set_content_type('text/html') |
239 self._cw.set_content_type('text/html') |
240 jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder) |
240 jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder) |
241 return """<script type="text/javascript"> |
241 return """<script type="text/javascript"> |
242 wp = window.parent; |
|
243 window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s); |
242 window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s); |
244 </script>""" % (domid, callback, errback, jsargs, cbargs) |
243 </script>""" % (domid, callback, errback, jsargs, cbargs) |
245 |
244 |
246 def publish(self, rset=None): |
245 def publish(self, rset=None): |
247 self._cw.json_request = True |
246 self._cw.json_request = True |