avoid using <br/>
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Mon, 27 Apr 2009 16:20:22 +0200
changeset 1609 79ec2b8e6466
parent 1608 57cd5b89d10c
child 1610 d38e10f92938
avoid using <br/>
web/widgets.py
--- a/web/widgets.py	Mon Apr 27 16:08:28 2009 +0200
+++ b/web/widgets.py	Mon Apr 27 16:20:22 2009 +0200
@@ -145,14 +145,15 @@
     def render_help(self, entity):
         """render a help message about the (edited) field"""
         req = entity.req
-        help = [u'<br/>']
+        help = [u'<div class="helper">']
         descr = self.description or self.rschema.rproperty(self.subjtype, self.objtype, 'description')
         if descr:
-            help.append(u'<span class="helper">%s</span>' % req._(descr))
+            help.append(u'<span>%s</span>' % req._(descr))
         example = self.render_example(req)
         if example:
-            help.append(u'<span class="helper">(%s: %s)</span>'
+            help.append(u'<span>(%s: %s)</span>'
                         % (req._('sample format'), example))
+	help.append(u'</div>')
         return u'&nbsp;'.join(help)
     
     def render_example(self, req):
@@ -755,14 +756,15 @@
     def render_help(self, entity):
         """calendar popup widget"""
         req = entity.req
-        help = [ u'<br/>' ]
+        help = [ u'<div class="helper">' ]
         descr = self.rschema.rproperty(self.subjtype, self.objtype, 'description')
         if descr:
-            help.append('<span class="helper">%s</span>' % req._(descr))
+            help.append('<span>%s</span>' % req._(descr))
         example = self.render_example(req)
         if example:
-            help.append('<span class="helper">(%s: %s)</span>'
+            help.append('<span>(%s: %s)</span>'
                         % (req._('sample format'), example))
+	help.append(u'</div>')
         return u'&nbsp;'.join(help)
 
     def render_calendar_popup(self, entity):