from django import forms
from django.contrib.auth.models import User
from .models import Dataset, Subject
from django.utils.translation import ugettext_lazy as _


class DatasetForm(forms.ModelForm):
	class Meta:
		model = Dataset
		fields = ['dataset_id', 'collection_site']
		labels={
			'dataset': _('Dataset'),
		'collection_site':_('Collection Site')
		}
		help_texts={
			'dataset': _('The name of the dataset this subject is a part of.'),
			'collection_site':_('The location the dataset was collected.')
		}

class SubjectForm(forms.ModelForm):
	class Meta:
		model = Subject
		fields = ['dataset', 'sub_id', 'sess_id', 'func_scan', 'struct_scan','an', 'slice_timing', 'dti_file', 'bvals_file', 'bvecs_file', 'state', 'bucket', 'bidsdir', 'jobdir', 'creds_file', 'datasetname', 'modality']
		labels={
			'dataset': _('Dataset'),
			'sub_id': _('Subject ID'),
			'sess_id': _('Session ID'),
			'func_scan':_('Functional Scan'),
			'struct_scan':_('Structural Scan'),
			'an':_('Structural scan type'),
			'slice_timing':_('Slice Timing Method'),
			'dti_file':_('DTI Image'),
			'bvals_file':_('DTI b-values File'),
			'bvecs_file':_('DTI b-vectors File'),
			'state':_('Analysis Level'),
			'bucket':_('S3 Bucket Name'),
			'bidsdir':_('S3 Bucket BIDS Directory'),
			'jobdir':_('Job Directory'),
			'creds_file':_('AWS Credentials File'),
			'datasetname':_('Dataset Name'),
			'modality':_('Modality')
		}
		help_texts={
			'dataset': _('The name of the dataset this subject is a part of.'),
			'sub_id': _('A unique identifier for the subject.'),
			'sess_id': _('A session name for the subject.'),
			'func_scan':_('the fMRI of this subject.'),
			'struct_scan':_('the structural MRI of this subject.'),
			'an':_('The Type of structural scan.'),
			'slice_timing':_('The method in which slices were acquired.'),
			'dti_file':_('DTI image file for NDMG pipeline'),
			'bvals_file':_('DTI b-values file for NDMG pipeline'),
			'bvecs_file':_('DRI b-vectors file for NDMG pipeline'),
			'state':_('Level of analysis to perform'),
			'bucket':_('Name of S3 bucket where data lives'),
			'bidsdir':_('Path on S3 bucket where data lives'),
			'jobdir':_('Directory of jobs to kill or check status'),
			'creds_file':_('File containing user credentials for AWS services'),
			'datasetname':_('Dataset name'),
			'modality':_('Modality of data')
		}

@@ -86,24 +86,18 @@
 ort 
-Dataset, Subject
+Submission
 %0Afro
@@ -161,368 +161,18 @@
 ass 
-DatasetForm(forms.ModelForm):%0A%09class Meta:%0A%09%09model = Dataset%0A%09%09fields = %5B'dataset_id', 'collection_site'%5D%0A%09%09labels=%7B%0A%09%09%09'dataset': _('Dataset'),%0A%09%09'collection_site':_('Collection Site')%0A%09%09%7D%0A%09%09help_texts=%7B%0A%09%09%09'dataset': _('The name of the dataset this subject is a part of.'),%0A%09%09%09'collection_site':_('The location the dataset was collected.')%0A%09%09%7D%0A%0Aclass Subject
+Submission
 Form
@@ -216,20 +216,23 @@
 el = Sub
-ject
+mission
 %0A%09%09field
@@ -241,1405 +241,425 @@
 = %5B'
-dataset', 'sub_id', 'sess_id', 'func_scan', 'struct_scan','an', 'slice_timing', 'dti_file', 'bvals_file', 'bvecs_file', 'state', 'bucket', 'bidsdir', 'jobdir', 'creds_file', 'datasetname', 'modality'%5D%0A%09%09labels=%7B%0A%09%09%09'dataset': _('Dataset'),%0A%09%09%09'sub_id': _('Subject ID'),%0A%09%09%09'sess_id': _('Session ID'),%0A%09%09%09'func_scan':_('Functional Scan'),%0A%09%09%09'struct_scan':_('Structural Scan'),%0A%09%09%09'an':_('Structural scan type'),%0A%09%09%09'slice_timing':_('Slice Timing Method'),%0A%09%09%09'dti_file':_('DTI Image'),%0A%09%09%09'bvals_file':_('DTI b-values File'),%0A%09%09%09'bvecs_file':_('DTI b-vectors File'),%0A%09%09%09'state':_('Analysis Level'),%0A%09%09%09'bucket':_('S3 Bucket Name'),%0A%09%09%09'bidsdir':_('S3 Bucket BIDS Directory'),%0A%09%09%09'jobdir':_('Job Directory'),%0A%09%09%09'creds_file':_('AWS Credentials File'),%0A%09%09%09'datasetname':_('Dataset Name'),%0A%09%09%09'modality':_('Modality')%0A%09%09%7D%0A%09%09help_texts=%7B%0A%09%09%09'dataset': _('The name of the dataset this subject is a part of.'),%0A%09%09%09'sub_id': _('A unique identifier for the subject.'),%0A%09%09%09'sess_id': _('A session name for the subject.'),%0A%09%09%09'func_scan':_('the fMRI of this subject.'),%0A%09%09%09'struct_scan':_('the structural MRI of this subject.'),%0A%09%09%09'an':_('The Type of structural scan.'),%0A%09%09%09'slice_timing':_('The method in which slices were acquired.'),%0A%09%09%09'dti_file':_('DTI image file for NDMG pipeline'),%0A%09%09%09'bvals_file':_('DTI b-values file for NDMG pipeline'),%0A%09%09%09'bvecs_file':_('DRI b-vectors file for NDMG pipeline'),
+state', 'bucket', 'bidsdir', 'jobdir', 'creds_file', 'datasetname', 'modality', 'slice_timing'%5D%0A%09%09labels=%7B%0A%09%09%09'state':_('Analysis Level'),%0A%09%09%09'bucket':_('S3 Bucket Name'),%0A%09%09%09'bidsdir':_('S3 Bucket BIDS Directory'),%0A%09%09%09'jobdir':_('Job Directory'),%0A%09%09%09'creds_file':_('AWS Credentials File'),%0A%09%09%09'datasetname':_('Dataset Name'),%0A%09%09%09'modality':_('Modality'),%0A%09%09%09'slice_timing':_('Slice Timing Method')%0A%09%09%7D%0A%09%09help_texts=%7B
 %0A%09%09%09
@@ -1011,13 +1011,79 @@
 f data')
+,%0A%09%09%09'slice_timing':_('The method in which slices were acquired.')
 %0A%09%09%7D%0A

Update forms.py