# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-18 17:09
from __future__ import unicode_literals

import autoslug.fields
import courselib.json_fields
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
import onlineforms.models


class Migration(migrations.Migration):

    dependencies = [
        ('onlineforms', '0004_formlogentry'),
    ]

    operations = [
        migrations.AlterField(
            model_name='field',
            name='fieldtype',
            field=models.CharField(choices=[('SMTX', 'Small Text (single line)'), ('MDTX', 'Medium Text (a few lines)'), ('LGTX', 'Large Text (many lines)'), ('EMAI', 'Email address'), ('RADI', 'Select with radio buttons'), ('SEL1', 'Select with a drop-down menu'), ('SELN', 'Select multiple values'), ('GRAD', 'Select grade (A+ to F)'), ('LIST', 'Enter a list of short responses'), ('FILE', 'Upload a file'), ('URL', 'Web page address (URL)'), ('TEXT', 'Explanation block (user enters nothing)'), ('DIVI', 'Divider'), ('DATE', 'A date'), ('SEM', 'Semester')], default='SMTX', max_length=4),
        ),
        migrations.AlterField(
            model_name='field',
            name='sheet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.Sheet'),
        ),
        migrations.AlterField(
            model_name='field',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique_with=('sheet',)),
        ),
        migrations.AlterField(
            model_name='fieldsubmission',
            name='data',
            field=courselib.json_fields.JSONField(default=dict),
        ),
        migrations.AlterField(
            model_name='fieldsubmission',
            name='field',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.Field'),
        ),
        migrations.AlterField(
            model_name='fieldsubmission',
            name='sheet_submission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.SheetSubmission'),
        ),
        migrations.AlterField(
            model_name='fieldsubmissionfile',
            name='field_submission',
            field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FieldSubmission'),
        ),
        migrations.AlterField(
            model_name='fieldsubmissionfile',
            name='file_attachment',
            field=models.FileField(blank=True, max_length=500, null=True, storage=django.core.files.storage.FileSystemStorage(base_url=None, location='submitted_files'), upload_to=onlineforms.models.attachment_upload_to),
        ),
        migrations.AlterField(
            model_name='form',
            name='advisor_visible',
            field=models.BooleanField(default=False, help_text='Should submissions be visible to advisors in this unit?'),
        ),
        migrations.AlterField(
            model_name='form',
            name='description',
            field=models.CharField(help_text='A brief description of the form that can be displayed to users.', max_length=500),
        ),
        migrations.AlterField(
            model_name='form',
            name='initiators',
            field=models.CharField(choices=[('LOG', 'Logged-in SFU users'), ('ANY', 'Anyone, including non-SFU users'), ('NON', 'Nobody: form cannot be filled out')], default='NON', help_text='Who is allowed to fill out the initial sheet? That is, who can initiate a new instance of this form?', max_length=3),
        ),
        migrations.AlterField(
            model_name='form',
            name='owner',
            field=models.ForeignKey(help_text='The group of users who own/administrate this form.', on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormGroup'),
        ),
        migrations.AlterField(
            model_name='form',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique=True),
        ),
        migrations.AlterField(
            model_name='form',
            name='title',
            field=models.CharField(help_text='The name of this form.', max_length=60),
        ),
        migrations.AlterField(
            model_name='form',
            name='unit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coredata.Unit'),
        ),
        migrations.AlterField(
            model_name='formfiller',
            name='config',
            field=courselib.json_fields.JSONField(default=dict),
        ),
        migrations.AlterField(
            model_name='formfiller',
            name='nonSFUFormFiller',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='onlineforms.NonSFUFormFiller'),
        ),
        migrations.AlterField(
            model_name='formfiller',
            name='sfuFormFiller',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='formgroup',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique=True),
        ),
        migrations.AlterField(
            model_name='formgroup',
            name='unit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coredata.Unit'),
        ),
        migrations.AlterField(
            model_name='formgroupmember',
            name='config',
            field=courselib.json_fields.JSONField(default=dict),
        ),
        migrations.AlterField(
            model_name='formgroupmember',
            name='formgroup',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormGroup'),
        ),
        migrations.AlterField(
            model_name='formgroupmember',
            name='person',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='category',
            field=models.CharField(choices=[('AUTO', 'Automatic update'), ('SYST', 'Automatic change by system'), ('MAIL', 'Email notification sent'), ('ADMN', 'Administrative action'), ('FILL', 'User action'), ('SAVE', 'Saved draft')], max_length=4),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='description',
            field=models.CharField(help_text='Description of the action/change', max_length=255),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='externalFiller',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='onlineforms.NonSFUFormFiller'),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='form_submission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormSubmission'),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='sheet_submission',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='onlineforms.SheetSubmission'),
        ),
        migrations.AlterField(
            model_name='formlogentry',
            name='user',
            field=models.ForeignKey(help_text='User who took the action/made the change', null=True, on_delete=django.db.models.deletion.PROTECT, to='coredata.Person'),
        ),
        migrations.AlterField(
            model_name='formsubmission',
            name='form',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.Form'),
        ),
        migrations.AlterField(
            model_name='formsubmission',
            name='initiator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormFiller'),
        ),
        migrations.AlterField(
            model_name='formsubmission',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormGroup'),
        ),
        migrations.AlterField(
            model_name='formsubmission',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique_with=('form',)),
        ),
        migrations.AlterField(
            model_name='formsubmission',
            name='status',
            field=models.CharField(choices=[('PEND', 'Waiting for the owner to assign a sheet or mark the form completed'), ('WAIT', 'Waiting for the user to complete their sheet'), ('DONE', 'No further action required'), ('REJE', 'Returned incomplete')], default='PEND', max_length=4),
        ),
        migrations.AlterField(
            model_name='nonsfuformfiller',
            name='config',
            field=courselib.json_fields.JSONField(default=dict),
        ),
        migrations.AlterField(
            model_name='sheet',
            name='can_view',
            field=models.CharField(choices=[('ALL', 'Filler can see all info on previous sheets'), ('NON', "Filler can't see any info on other sheets (just name/email of initiator)"), ('INI', 'Filler can see only the initial sheet')], default='NON', help_text='When someone is filling out this sheet, what else can they see?', max_length=4),
        ),
        migrations.AlterField(
            model_name='sheet',
            name='form',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.Form'),
        ),
        migrations.AlterField(
            model_name='sheet',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique_with=('form',)),
        ),
        migrations.AlterField(
            model_name='sheetsubmission',
            name='filler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormFiller'),
        ),
        migrations.AlterField(
            model_name='sheetsubmission',
            name='form_submission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.FormSubmission'),
        ),
        migrations.AlterField(
            model_name='sheetsubmission',
            name='sheet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.Sheet'),
        ),
        migrations.AlterField(
            model_name='sheetsubmission',
            name='slug',
            field=autoslug.fields.AutoSlugField(editable=False, populate_from='autoslug', unique_with=('form_submission',)),
        ),
        migrations.AlterField(
            model_name='sheetsubmission',
            name='status',
            field=models.CharField(choices=[('WAIT', 'Waiting for the user to complete their sheet'), ('DONE', 'No further action required'), ('REJE', 'Returned incomplete')], default='WAIT', max_length=4),
        ),
        migrations.AlterField(
            model_name='sheetsubmissionsecreturl',
            name='sheet_submission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlineforms.SheetSubmission'),
        ),
    ]
