'script' field of form definitions is now required.

pull/7/head
Ferry Boender 10 years ago
parent 32e8e60328
commit a4da0ed8d5
  1. 5
      src/scriptform.py

@ -192,10 +192,7 @@ class ScriptForm:
users = config['users']
for form in config['forms']:
form_name = form['name']
if 'script' in form:
script = os.path.join(self.basepath, form['script'])
else:
script = None
forms.append(
FormDefinition(form_name,
form['title'],
@ -305,7 +302,7 @@ class FormDefinition:
FormDefinition holds information about a single form and provides methods
for validation of the form values.
"""
def __init__(self, name, title, description, fields, script=None,
def __init__(self, name, title, description, fields, script,
output='escaped', submit_title="Submit",
allowed_users=None):
self.name = name

Loading…
Cancel
Save