Skip to content

Commit

Permalink
Reload the Agree-to-terms page if the user doesn't make a choice
Browse files Browse the repository at this point in the history
Older browsers don't understand the 'required' attribute of form
elements and so will happily submit the form without requiring
the user to make a choice. In this case, show an error message
and display the form again
  • Loading branch information
alastair committed May 25, 2018
1 parent 381e47d commit d17aec9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webserver/views/index.py
Expand Up @@ -39,6 +39,9 @@ def gdpr_notice():
return redirect(url_for('index.index'))
elif request.form.get('gdpr-options') == 'disagree':
return redirect(url_for('login.logout', next=request.args.get('next')))
else:
flash.error('You must agree to or decline our terms')
return render_template('index/gdpr.html', next=request.args.get('next'))


@index_bp.route("/download")
Expand Down

0 comments on commit d17aec9

Please sign in to comment.