# HG changeset patch # User Sylvain Thénault # Date 1464787029 -7200 # Node ID 5153f6fd478e4d8dc0c1fd730f0bb4900506ed5d # Parent 00d42916f238df9c6e64eff0efaf2d3c49076803 Define BASE_URL and DATA_URL js variables in the login template. Closes #13385185 Those are expected to be defined in almost every js files. They were not before this patch because login form doesn't use the regular main template. diff -r 00d42916f238 -r 5153f6fd478e web/views/basetemplates.py --- a/web/views/basetemplates.py Fri Jun 10 13:21:31 2016 +0200 +++ b/web/views/basetemplates.py Wed Jun 01 15:17:09 2016 +0200 @@ -46,6 +46,8 @@ w(u'') def template_header(self, content_type, view=None, page_title='', additional_headers=()): + self._cw.html_headers.define_var('BASE_URL', self._cw.base_url()) + self._cw.html_headers.define_var('DATA_URL', self._cw.datadir_url) w = self.whead # explictly close the tag to avoid IE 6 bugs while browsing DOM w(u'' % xml_escape(self._cw.base_url()))