mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Terms of use confirmation
This commit is contained in:
		@@ -43,6 +43,10 @@ class RegistrationForm(FlaskForm):
 | 
			
		||||
            EqualTo('password', message='Passwords must match')
 | 
			
		||||
        ]
 | 
			
		||||
    )
 | 
			
		||||
    terms_of_use_accepted = BooleanField(
 | 
			
		||||
        'I have read and accept the terms of use',
 | 
			
		||||
        validators=[InputRequired()]
 | 
			
		||||
    )
 | 
			
		||||
    submit = SubmitField()
 | 
			
		||||
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,8 @@ def register():
 | 
			
		||||
            user = User.create(
 | 
			
		||||
                email=form.email.data.lower(),
 | 
			
		||||
                password=form.password.data,
 | 
			
		||||
                username=form.username.data
 | 
			
		||||
                username=form.username.data,
 | 
			
		||||
                terms_of_use_accepted=form.terms_of_use_accepted.data
 | 
			
		||||
            )
 | 
			
		||||
        except OSError:
 | 
			
		||||
            flash('Internal Server Error', category='error')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user