Skip to content
Snippets Groups Projects
Commit a4a17f1e authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

added cerfity buttom feature

parent ff481fa2
No related tags found
1 merge request!2added cerfity buttom feature
Pipeline #5806 failed
...@@ -58,7 +58,7 @@ def create_app(config_name): ...@@ -58,7 +58,7 @@ def create_app(config_name):
return render_template('errors/blocked.html') return render_template('errors/blocked.html')
elif rc_util.check_state(session['user'].get('username')) == "certification": elif rc_util.check_state(session['user'].get('username')) == "certification":
return render_template('errors/certification.html') return redirect(url_for('certify_account'))
else: else:
return render_template('auth/SignUp.html', room_id=session['uid'], return render_template('auth/SignUp.html', room_id=session['uid'],
...@@ -74,9 +74,13 @@ def create_app(config_name): ...@@ -74,9 +74,13 @@ def create_app(config_name):
def account_block(): def account_block():
return render_template('errors/blocked.html') return render_template('errors/blocked.html')
@app.route('/certify_account') @app.route("/certify_account", methods=['GET', 'POST'])
def error_certify(): def certify_account():
return render_template('errors/certification.html') 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 # misc page error catching
@app.errorhandler(403) @app.errorhandler(403)
......
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
<div class="col-md-10 col-sm-10 my-col"> <div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper"> <div id="form-wrapper">
<h2> Account/User Certification Needed </h2> <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="certify"> Certify Account</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="accountCertification()"> Certify Account</button>
</div> </div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment