From c7900e5b1e2651a28410d13dfa58c37701b65692 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 31 Jul 2019 17:49:41 +0100 Subject: Add terms and conditions to registration page --- app/auth/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/auth/forms.py') diff --git a/app/auth/forms.py b/app/auth/forms.py index 7758342..ea194a5 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -3,7 +3,7 @@ from flask import current_app from flask_wtf import FlaskForm -from wtforms import StringField, PasswordField, SubmitField +from wtforms import StringField, PasswordField, SubmitField, BooleanField from wtforms.validators import DataRequired, ValidationError, Email, EqualTo from app.models import User @@ -22,6 +22,8 @@ class RegistrationForm(FlaskForm): password2 = PasswordField( "Repeat Password", validators=[DataRequired(), EqualTo("password")] ) + toc = BooleanField("I agree to the Terms and Conditions.", + validators=[DataRequired(), ]) submit = SubmitField("Register") def validate_username(self, username): -- cgit v1.2.3