equal
deleted
inserted
replaced
95 return u'' |
95 return u'' |
96 if isinstance(field.label, tuple): # i.e. needs contextual translation |
96 if isinstance(field.label, tuple): # i.e. needs contextual translation |
97 label = self._cw.pgettext(*field.label) |
97 label = self._cw.pgettext(*field.label) |
98 else: |
98 else: |
99 label = self._cw._(field.label) |
99 label = self._cw._(field.label) |
100 attrs = {'for': form.context[field]['id']} |
100 attrs = {'for': field.dom_id(form)} |
101 if field.required: |
101 if field.required: |
102 attrs['class'] = 'required' |
102 attrs['class'] = 'required' |
103 return tags.label(label, **attrs) |
103 return tags.label(label, **attrs) |
104 |
104 |
105 def render_help(self, form, field): |
105 def render_help(self, form, field): |