# -*- coding: utf-8 -*-

# Copyright (C) 2015 Sylvain Boily <sboily@proformatique.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


from flask_wtf.form import Form
from wtforms import validators
from wtforms.fields import TextField, PasswordField, SubmitField, SelectField
from wtforms.fields.simple import TextAreaField


class WizardForm(Form):
    hostname = TextField('Hostname', [validators.Required()])
    domain = TextField('Domain', [validators.Required()])
    timezone = TextField('Timezone', [validators.Required()])
    nameservers = TextAreaField('Nameservers', [validators.Required()])
    username = TextField('Username', [validators.Required()])
    password = PasswordField('Password', [validators.Required()])
    email = TextField('Email',
                      [validators.Length(min=6, max=120), validators.Email()])
    language = SelectField('Language',
                           [validators.Required()],
                           choices=[('en_EN', 'English'), ('fr_FR', 'French')])
    submit = SubmitField('Submit')
