web/views/basetemplates.py
branchstable
changeset 4600 ae95c3241226
parent 4599 dafa39be525d
child 4603 ce19b0a05db3
--- a/web/views/basetemplates.py	Tue Feb 16 14:39:28 2010 +0100
+++ b/web/views/basetemplates.py	Tue Feb 16 14:39:51 2010 +0100
@@ -466,6 +466,7 @@
 class LogForm(forms.FieldsForm):
     __regid__ = 'logform'
     domid = 'loginForm'
+    needs_css = ('cubicweb.login.css',)
     # XXX have to recall fields name since python is mangling __login/__password
     __login = ff.StringField('__login', widget=fw.TextInput({'class': 'data'}))
     __password = ff.StringField('__password', label=_('password'),
@@ -485,7 +486,6 @@
     title = 'log in'
 
     def call(self, id, klass, title=True, showmessage=True):
-        self._cw.add_css('cubicweb.login.css')
         self.w(u'<div id="%s" class="%s">' % (id, klass))
         if title:
             stitle = self._cw.property_value('ui.site-title')