Fix notice when form does not require user input

This commit is contained in:
Jeremy Stretch
2019-08-14 10:18:25 -04:00
parent ce43e5f6ea
commit 500eb63d9f
2 changed files with 13 additions and 4 deletions

View File

@@ -404,3 +404,10 @@ class ScriptForm(BootstrapMixin, forms.Form):
# Move _commit to the end of the form
self.fields.move_to_end('_commit', True)
@property
def requires_input(self):
"""
A boolean indicating whether the form requires user input (ignore the _commit field).
"""
return bool(len(self.fields) > 1)