from django import forms
from django.contrib.auth.models import User
from .models import Submission
from django.utils.translation import ugettext_lazy as _


class SubmissionForm(forms.ModelForm):
	class Meta:
		model = Submission
		fields = ['state', 'bucket', 'bidsdir', 'jobdir', 'creds_file', 'datasetname', 'modality', 'slice_timing', 'data_file', 'upload_data_or_not']
		labels={
			'state':_('Analysis Level'),
			'bucket':_('S3 Bucket Name'),
			'bidsdir':_('BIDS Directory'),
			'jobdir':_('Unique Token'),
			'creds_file':_('AWS Credentials File'),
			'datasetname':_('Dataset Name'),
			'modality':_('Modality'),
			'slice_timing':_('Slice Timing Method'),
			'data_file':_('Local Data (Zipped)'),
			'upload_data_or_not':_('Upload Local Data?')
		}
		help_texts={
			'state':_('Level of analysis to perform'),
			'bucket':_('Name of S3 bucket where data lives'),
			'bidsdir':_('Path on S3 bucket where data lives'),
			'jobdir':_('Unique identifier for job submission to facilitate later queries'),
			'creds_file':_('File containing user credentials for AWS services'),
			'datasetname':_('Dataset name (group analysis)'),
			'modality':_('Modality of data'),
			'slice_timing':_('The method in which slices were acquired.'),
			'data_file':_('Local data to be uploaded to S3 bucket(stored in BIDS formatting and zipped).'),
			'upload_data_or_not':_('Whether or not the local data should be uploaded to S3.')
		}

@@ -801,16 +801,25 @@
 nalysis 
+you want 
 to perfo
@@ -847,16 +847,20 @@
 Name of 
+the 
 S3 bucke
@@ -859,32 +859,37 @@
 S3 bucket where 
+your 
 data lives'),%0A%09%09
@@ -905,17 +905,17 @@
 ':_(
-'
+%22
 Path on 
 S3 b
@@ -910,16 +910,20 @@
 Path on 
+the 
 S3 bucke
@@ -944,84 +944,120 @@
 ives
-'),%0A%09%09%09'jobdir':_('Unique identifier for job submission to facilitat
+ (root folder of BIDS spec'd data)%22),%0A%09%09%09'jobdir':_('Your personalized unique identifier that you can us
 e later 
 quer
@@ -1052,16 +1052,20 @@
 e later 
+for 
 queries'
@@ -1086,17 +1086,21 @@
 ile':_('
-F
+CSV f
 ile cont
@@ -1106,16 +1106,21 @@
 taining 
+your 
 user cre
@@ -1182,16 +1182,25 @@
 t name (
+only for 
 group an
@@ -1239,16 +1239,20 @@
 lity of 
+the 
 data'),%0A
@@ -1292,16 +1292,25 @@
 n which 
+the data 
 slices w
@@ -1321,17 +1321,16 @@
 acquired
-.
 '),%0A%09%09%09'
@@ -1359,73 +1359,121 @@
 ta t
-o be uploaded to S3 bucket(stored in BIDS formatting and zipped).
+hat you want to uploaded to the specified S3 bucket before running analysis (zipped at one level above BIDS root)
 '),%0A
@@ -1498,17 +1498,17 @@
 _not':_(
-'
+%22
 Whether 
@@ -1557,10 +1557,60 @@
 o S3
-.'
+ (select 'No' if you haven't selected a file above)%22
 )%0A%09%09

Update forms.py