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.
--- 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'</body>')
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 <base> tag to avoid IE 6 bugs while browsing DOM
w(u'<base href="%s"></base>' % xml_escape(self._cw.base_url()))