from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField
from wtforms.validators import DataRequired, Email, Length

class AddUserForm(Form):
	name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")])
	username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")])
	role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')])
	password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")])
	submit = SubmitField('Add User')

class LoginForm(Form):
	username = StringField('Username', validators=[DataRequired("Please enter a usename")])
	password = PasswordField('Password', validators=[DataRequired('Please enter a password')])
	remember = BooleanField('Remember me')
	submit = SubmitField("Login")

class RetrievalForm(Form):	
	amount = StringField('Input the amount taken', validators=[validators.input_required()])
	submit = SubmitField("Enter Quantity")



from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField
from wtforms.validators import DataRequired, Email, Length

class AddUserForm(Form):
	name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")])
	username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")])
	role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')])
	password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")])
	submit = SubmitField('Add User')

class LoginForm(Form):
	username = StringField('Username', validators=[DataRequired("Please enter a username")])
	password = PasswordField('Password', validators=[DataRequired('Please enter a password')])
	remember = BooleanField()
	submit = SubmitField("Login")

class RetrievalForm(Form):	
	amount = StringField('Input the amount taken', validators=[validators.input_required()])
	submit = SubmitField("Enter Quantity")



Change LoginForm parameter for BooleanField
Change LoginForm parameter for BooleanField

  from flask_wtf import Form
  from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField
  from wtforms.validators import DataRequired, Email, Length
  
  class AddUserForm(Form):
  	name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")])
  	username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")])
  	role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')])
  	password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")])
  	submit = SubmitField('Add User')
  
  class LoginForm(Form):
- 	username = StringField('Username', validators=[DataRequired("Please enter a usename")])
+ 	username = StringField('Username', validators=[DataRequired("Please enter a username")])
  	password = PasswordField('Password', validators=[DataRequired('Please enter a password')])
- 	remember = BooleanField('Remember me')
+ 	remember = BooleanField()
  	submit = SubmitField("Login")
  
  class RetrievalForm(Form):	
  	amount = StringField('Input the amount taken', validators=[validators.input_required()])
  	submit = SubmitField("Enter Quantity")
  
  
  
Change LoginForm parameter for BooleanField
## Code Before:
from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField
from wtforms.validators import DataRequired, Email, Length

class AddUserForm(Form):
	name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")])
	username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")])
	role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')])
	password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")])
	submit = SubmitField('Add User')

class LoginForm(Form):
	username = StringField('Username', validators=[DataRequired("Please enter a usename")])
	password = PasswordField('Password', validators=[DataRequired('Please enter a password')])
	remember = BooleanField('Remember me')
	submit = SubmitField("Login")

class RetrievalForm(Form):	
	amount = StringField('Input the amount taken', validators=[validators.input_required()])
	submit = SubmitField("Enter Quantity")



## Instruction:
Change LoginForm parameter for BooleanField
## Code After:
from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField
from wtforms.validators import DataRequired, Email, Length

class AddUserForm(Form):
	name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")])
	username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")])
	role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')])
	password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")])
	submit = SubmitField('Add User')

class LoginForm(Form):
	username = StringField('Username', validators=[DataRequired("Please enter a username")])
	password = PasswordField('Password', validators=[DataRequired('Please enter a password')])
	remember = BooleanField()
	submit = SubmitField("Login")

class RetrievalForm(Form):	
	amount = StringField('Input the amount taken', validators=[validators.input_required()])
	submit = SubmitField("Enter Quantity")


