equal
deleted
inserted
replaced
222 error = form.field_error(field) |
222 error = form.field_error(field) |
223 if error: |
223 if error: |
224 w(u' class="error"') |
224 w(u' class="error"') |
225 w(u'>') |
225 w(u'>') |
226 w(field.render(form, self)) |
226 w(field.render(form, self)) |
|
227 if error: |
|
228 self.render_error(w, error) |
227 if self.display_help: |
229 if self.display_help: |
228 w(self.render_help(form, field)) |
230 w(self.render_help(form, field)) |
229 w(u'</td></tr>') |
231 w(u'</td></tr>') |
230 w(u'</table></fieldset>') |
232 w(u'</table></fieldset>') |
231 if byfieldset: |
233 if byfieldset: |
239 w(u'<td>%s</td>\n' % button.render(form)) |
241 w(u'<td>%s</td>\n' % button.render(form)) |
240 w(u'</tr></table>') |
242 w(u'</tr></table>') |
241 |
243 |
242 def render_error(self, w, err): |
244 def render_error(self, w, err): |
243 """return validation error for widget's field, if any""" |
245 """return validation error for widget's field, if any""" |
244 w(u'<span class="error">%s</span>' % err) |
246 w(u'<span class="errorMsg">%s</span>' % err) |
245 |
247 |
246 |
248 |
247 |
249 |
248 class BaseFormRenderer(FormRenderer): |
250 class BaseFormRenderer(FormRenderer): |
249 """use form_renderer_id = 'base' if you want base FormRenderer layout even |
251 """use form_renderer_id = 'base' if you want base FormRenderer layout even |