form: add novalidate to cancel, previous and save-draft buttons (#6188)

This commit is contained in:
Frédéric Péters 2015-10-17 22:20:30 +02:00
parent 2126931d33
commit df9bab4c1f
1 changed files with 7 additions and 0 deletions

View File

@ -178,6 +178,13 @@ def text_render_content(self):
TextWidget.render_content = text_render_content
def submit_render_content(self):
if self.name in ('cancel', 'previous', 'save-draft'):
self.attrs['formnovalidate'] = 'formnovalidate'
return super(self.__class__, self).render_content()
SubmitWidget.render_content = submit_render_content
def radiobuttons_render_content(self):
tags = []
for object, description, key in self.options: