mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Validate registration process. Change copyright year.
This commit is contained in:
parent
bd45c4ef87
commit
3d8d94f280
@ -116,7 +116,7 @@
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
<div class="login-box-footer">
|
||||
<center><p>2016 © Khanh Ngo</p></center>
|
||||
<center><p>2018 © Khanh Ngo</p></center>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
<!-- /.form-box -->
|
||||
<div class="login-box-footer">
|
||||
<center><p>2016 © Khanh Ngo</p></center>
|
||||
<center><p>2018 © Khanh Ngo</p></center>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
@ -389,13 +389,16 @@ def login():
|
||||
login_user(user, remember = remember_me)
|
||||
return redirect(request.args.get('next') or url_for('index'))
|
||||
else:
|
||||
if not username or not password or not email:
|
||||
return render_template('register.html', error='Please input required information')
|
||||
|
||||
# registration case
|
||||
user = User(username=username, plain_text_password=password, firstname=firstname, lastname=lastname, email=email)
|
||||
|
||||
# TODO: Move this into the JavaScript
|
||||
# validate password and password confirmation
|
||||
if password != rpassword:
|
||||
error = "Passsword and confirmation do not match"
|
||||
error = "Password confirmation does not match"
|
||||
return render_template('register.html', error=error)
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user