diff --git a/app/__init__.py b/app/__init__.py index 7a3e0619adc844d665b12a44ab231245e2aa28a5..aa572f53a416ae0f3db26b1854c2e82eed35188e 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -58,7 +58,7 @@ def create_app(config_name): return render_template('errors/blocked.html') elif rc_util.check_state(session['user'].get('username')) == "certification": - return render_template('errors/certification.html') + return redirect(url_for('certify_account')) else: return render_template('auth/SignUp.html', room_id=session['uid'], @@ -74,9 +74,13 @@ def create_app(config_name): def account_block(): return render_template('errors/blocked.html') - @app.route('/certify_account') - def error_certify(): - return render_template('errors/certification.html') + @app.route("/certify_account", methods=['GET', 'POST']) + def certify_account(): + if request.method == 'POST': + if request.form.get('action1') == 'VALUE1': + rc_util.update_state(session['user'].get('username'), ok) + elif request.method == 'GET': + return render_template('errors/certification.html', form=form) # misc page error catching @app.errorhandler(403) diff --git a/app/templates/errors/certification.html b/app/templates/errors/certification.html index 529b7c7770a83095705db4a87bbea06b6ceee42d..a290bf07f99838238ff4069777fbbaad0d83027d 100644 --- a/app/templates/errors/certification.html +++ b/app/templates/errors/certification.html @@ -53,8 +53,7 @@ <div class="col-md-10 col-sm-10 my-col"> <div id="form-wrapper"> <h2> Account/User Certification Needed </h2> - <p style="font-size:110%;"> {{ welcome_msg |safe }}</p> - <button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="accountCertification()"> Certify Account</button> + <button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="certify"> Certify Account</button> </div> </div> </div>