Private
Public Access
1
0

primitive version of workflow config form (not working)

This commit is contained in:
Sander Roosendaal
2017-10-18 12:03:31 +02:00
parent 10cc35b269
commit 3bec917456
9 changed files with 207 additions and 9 deletions

View File

@@ -57,7 +57,41 @@ class DocumentsForm(forms.Form):
class Meta:
fields = ['title','file','workouttype','fileformat']
from utils import workflowleftpanel,workflowmiddlepanel
# Form to change Workflow page layout
class WorkFlowLeftPanelForm(forms.Form):
panels = ['panel_editbuttons.html','panel_stats.html','panel_staticchart.html']
leftpanel = forms.MultipleChoiceField(label='Left Panel',
choices=workflowleftpanel,
initial=panels)
def __init__(self, *args, **kwargs):
if 'instance' in kwargs:
r = kwargs.pop('instance')
panels = r.workflowleftpanel
else:
panels = ['panel_editbuttons.html','panel_stats.html','panel_staticchart.html']
super(WorkFlowLeftPanelForm,self).__init__(*args, **kwargs)
class WorkFlowMiddlePanelForm(forms.Form):
panels = ['panel_statcharts.html',
'flexthumbnails.html',
'panel_summary.html']
middlepanel = forms.MultipleChoiceField(label='Middle Panel',
choices=workflowmiddlepanel,
initial=panels)
def __init__(self, *args, **kwargs):
if 'instance' in kwargs:
r = kwargs.pop('instance')
panels = r.workflowleftpanel
else:
panels = ['panel_editbuttons.html','panel_stats.html','panel_staticchart.html']
super(WorkFlowMiddlePanelForm,self).__init__(*args, **kwargs)
# The form to indicate additional actions to be performed immediately
# after a successful upload
class UploadOptionsForm(forms.Form):