web/views/basecontrollers.py
branchstable
changeset 2371 76bf522c27be
parent 2345 16e3d0e47ee6
child 2381 caad2367d940
child 2382 c1dcb5aef4b4
--- a/web/views/basecontrollers.py	Fri Jul 10 12:15:09 2009 +0200
+++ b/web/views/basecontrollers.py	Fri Jul 10 14:23:35 2009 +0200
@@ -404,17 +404,16 @@
     @jsonize
     def js_edit_relation(self, action, names, values, rtype,
                          role, eid, vid, default, lzone):
-        success, args = self.validate_form(action, names, values)
-        if success:
-            entity = self.req.eid_rset(eid).get_entity(0, 0)
-            rset = entity.related(rtype, role)
-            if rset:
-                output = self.view(vid, rset)
-            else:
-                output = default
-            return (success, args, lzone + output)
-        else:
-            return (success, args, None)
+        if rtype == 'license_of':
+            print action, names, values, rtype, role, eid, vid, default
+        success, url = self.validate_form(action, names, values)
+        return (success, url)
+
+    @jsonize
+    def js_reledit_form(self, eid, rtype, role, lzone):
+        entity = self.req.eid_rset(eid).get_entity(0, 0)
+        return entity.view('reledit', rtype=rtype, role=role,
+                           landing_zone=lzone)
 
     @jsonize
     def js_i18n(self, msgids):