# Path: mass_flask_core/models/tlp_level.py
# class TLPLevelField(IntField):
#     TLP_LEVEL_WHITE = 0  # Access without login
#     TLP_LEVEL_GREEN = 1  # Access with login
#     TLP_LEVEL_AMBER = 2  # Access only for especially authorized users of same group
#     TLP_LEVEL_RED = 3    # Access only for explicitly mentioned users/groups
# 
#     def __init__(self, *args, **kwargs):
#         kwargs['choices'] = [
#             TLPLevelField.TLP_LEVEL_WHITE,
#             TLPLevelField.TLP_LEVEL_GREEN,
#             TLPLevelField.TLP_LEVEL_AMBER,
#             TLPLevelField.TLP_LEVEL_RED
#         ]
#         super(TLPLevelField, self).__init__(*args, **kwargs)


from flask_wtf import Form
from flask_wtf.file import FileField, FileRequired
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import InputRequired, IPAddress, URL
from mass_flask_core.models import TLPLevelField


class FileSampleSubmitForm(Form):
    file = FileField('File', validators=[FileRequired()])
    tlp_level = SelectField('Sample privacy (TLP level)', coerce=int, choices=[

# Path: mass_flask_core/models/tlp_level.py
# class TLPLevelField(IntField):
#     TLP_LEVEL_WHITE = 0  # Access without login
#     TLP_LEVEL_GREEN = 1  # Access with login
#     TLP_LEVEL_AMBER = 2  # Access only for especially authorized users of same group
#     TLP_LEVEL_RED = 3    # Access only for explicitly mentioned users/groups
# 
#     def __init__(self, *args, **kwargs):
#         kwargs['choices'] = [
#             TLPLevelField.TLP_LEVEL_WHITE,
#             TLPLevelField.TLP_LEVEL_GREEN,
#             TLPLevelField.TLP_LEVEL_AMBER,
#             TLPLevelField.TLP_LEVEL_RED
#         ]
#         super(TLPLevelField, self).__init__(*args, **kwargs)


# Path: mass_flask_webui/forms/submit.py
from flask_wtf import Form
from flask_wtf.file import FileField, FileRequired
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import InputRequired, IPAddress, URL
from mass_flask_core.models import TLPLevelField



class FileSampleSubmitForm(Form):
    file = FileField('File', validators=[FileRequired()])
    tlp_level = SelectField('Sample privacy (TLP level)', coerce=int, choices=[

        (TLPLevelField.TLP_LEVEL_WHITE, 'WHITE (unlimited)'),