[sources management] properly set __linkto, closes #1922970 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 16 Sep 2011 14:43:41 +0200
branchstable
changeset 7804 814fb7f379a3
parent 7799 6f84279e0718
child 7805 7111bb64b58f
[sources management] properly set __linkto, closes #1922970 when clicking on 'add mapping part' on an external source view, one expect to have source properly selected in form
web/views/cwsources.py
--- a/web/views/cwsources.py	Fri Sep 16 12:48:02 2011 +0200
+++ b/web/views/cwsources.py	Fri Sep 16 14:43:41 2011 +0200
@@ -72,7 +72,8 @@
         eschema = self._cw.vreg.schema.eschema('CWSourceSchemaConfig')
         if eschema.has_perm(self._cw, 'add'):
             self.w(u'<a href="%s" class="addButton right">%s</a>' % (
-                self._cw.build_url('add/%s' % eschema),
+                self._cw.build_url('add/%s' % eschema,
+                                   __linkto='cw_for_source:%s:subject' % entity.eid),
                 self._cw._('add a CWSourceSchemaConfig')))
             self.w(u'<div class="clear"></div>')
         rset = self._cw.execute(