Skip to content
Snippets Groups Projects
Commit b611df7c authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Merge branch 'fix-messages' into 'master'

Message passing for account services pages

See merge request rc/self-reg-form!32
parents b352f5e9 cd5c7ce6
No related branches found
No related tags found
1 merge request!32Message passing for account services pages
......@@ -47,19 +47,17 @@ def create_app(config_name):
session['return_url'] = request.args.get('redir', vars.default_referrer)
if (not any(item in session['user'].get('eppa') for item in valid_eppa)):
return render_template('account/unauthorized.html')
return render_template('account/unauthorized.html', unauthorized_message=messages.unauthorized_message)
if rc_util.check_state(session['user'].get('username')) == "blocked":
return render_template('account/blocked.html')
return render_template('account/blocked.html', unauthorized_message=messages.unauthorized_message)
elif rc_util.check_state(session['user'].get('username')) == "certification":
return render_template('account/certify.html', room_id=session['uid'],
username=session['user'].get('username'),
fullname=session['user'].get('fullname'), email=session['user'].get('email'),
referrer=session['return_url'], cancel_url=vars.default_referrer,
welcome_msg=messages.welcome_message,
cancel_msg=messages.cancel_message,
error_msg=messages.error_message)
cancel_msg=messages.cancel_message, certification_message_msg=messages.certification_message)
else:
return render_template('auth/SignUp.html', room_id=session['uid'],
username=session['user'].get('username'),
......
......@@ -53,7 +53,7 @@
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Account blocked </h2>
<p style="font-size:110%;"> {{ welcome_msg |safe }}</p>
<p style="font-size:110%;"> {{ unauthorized_message |safe }}</p>
</div>
</div>
</div>
......
......@@ -79,8 +79,8 @@
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Self Certification Form </h2>
<p style="font-size:110%;"> {{ welcome_msg |safe }}</p>
<h2> Annual Recertification Form </h2>
<p style="font-size:110%;"> {{ certification_message |safe }}</p>
<div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="col-md-7 col-sm-7 my-col">
......
......@@ -53,7 +53,7 @@
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Account Authorization error </h2>
<p style="font-size:110%;"> {{ welcome_msg |safe }}</p>
<p style="font-size:110%;"> {{ unauthorized_message |safe }}</p>
</div>
</div>
</div>
......
welcome_message = "The information below will be used to create your account. Please fill in the reason for requesting your account as this helps us understand our user base.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions."
cancel_message = "Close current tab to end session.<br>Contact <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> if you have any questions."
error_message = "An error occurred while creating your account. Research Computing team has been notified and is working on fixing it.<br>Contact <a href='mailto:support@listserv.uab.edu'>Research Computing</a> if you have any questions."
certification_message = "Welcome back to the UAB Research Computing services page.<br>We are asking for researchers to recertify their accounts annually so that we'll know who is still actively using the systems. <br>Fill out the form below and hit the Certify Account button when you are done."
unauthorized_message = "Your UAB Research Computing account is currently on hold.<br>Accounts are put on hold if there are changes with UAB affiliation or if there is an issue on one of the platforms.<br>Please reach out to <a href="'mailto:support@listserv.uab.edu'">Research Computing</a> or attend the weekly office hours and we'll work with you to clear your account."
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