|
|
|
@ -200,6 +200,7 @@ class ScriptForm: |
|
|
|
|
form['fields'], |
|
|
|
|
script, |
|
|
|
|
output=form.get('output', 'escaped'), |
|
|
|
|
hide=form.get('hide', False), |
|
|
|
|
submit_title=form.get('submit_title', 'Submit'), |
|
|
|
|
allowed_users=form.get('allowed_users', None)) |
|
|
|
|
) |
|
|
|
@ -303,7 +304,7 @@ class FormDefinition: |
|
|
|
|
for validation of the form values. |
|
|
|
|
""" |
|
|
|
|
def __init__(self, name, title, description, fields, script, |
|
|
|
|
output='escaped', submit_title="Submit", |
|
|
|
|
output='escaped', hide=False, submit_title="Submit", |
|
|
|
|
allowed_users=None): |
|
|
|
|
self.name = name |
|
|
|
|
self.title = title |
|
|
|
@ -311,6 +312,7 @@ class FormDefinition: |
|
|
|
|
self.fields = fields |
|
|
|
|
self.script = script |
|
|
|
|
self.output = output |
|
|
|
|
self.hide = hide |
|
|
|
|
self.submit_title = submit_title |
|
|
|
|
self.allowed_users = allowed_users |
|
|
|
|
|
|
|
|
@ -604,6 +606,8 @@ class ScriptFormWebApp(WebAppHandler): |
|
|
|
|
if form_def.allowed_users is not None and \ |
|
|
|
|
self.username not in form_def.allowed_users: |
|
|
|
|
continue # User is not allowed to run this form |
|
|
|
|
if form_def.hide: |
|
|
|
|
continue # Don't show hidden forms in the list. |
|
|
|
|
h_form_list.append(u''' |
|
|
|
|
<li> |
|
|
|
|
<h2 class="form-title">{title}</h2> |
|
|
|
|