primitive version of workflow config form (not working)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user