equal
deleted
inserted
replaced
81 if field.required: |
81 if field.required: |
82 attrs['class'] = 'required' |
82 attrs['class'] = 'required' |
83 return tags.label(label, **attrs) |
83 return tags.label(label, **attrs) |
84 |
84 |
85 def render_help(self, form, field): |
85 def render_help(self, form, field): |
86 help = [ u'<br/>' ] |
86 help = [] |
87 descr = field.help |
87 descr = field.help |
88 if descr: |
88 if descr: |
89 help.append('<span class="helper">%s</span>' % form.req._(descr)) |
89 help.append('<div class="helper">%s</div>' % form.req._(descr)) |
90 example = field.example_format(form.req) |
90 example = field.example_format(form.req) |
91 if example: |
91 if example: |
92 help.append('<span class="helper">(%s: %s)</span>' |
92 help.append('<div class="helper">(%s: %s)</div>' |
93 % (form.req._('sample format'), example)) |
93 % (form.req._('sample format'), example)) |
94 return u' '.join(help) |
94 return u' '.join(help) |
95 |
95 |
96 # specific methods (mostly to ease overriding) ############################# |
96 # specific methods (mostly to ease overriding) ############################# |
97 |
97 |