From a4da0ed8d569b0769e401a4327f06dfc1fe9ae45 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Fri, 24 Apr 2015 08:26:57 +0200 Subject: [PATCH] 'script' field of form definitions is now required. --- src/scriptform.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/scriptform.py b/src/scriptform.py index 727c36d..66385d6 100755 --- a/src/scriptform.py +++ b/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 + script = os.path.join(self.basepath, form['script']) 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