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