Commit 6f86d81d authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Merge branch 'feat-certify-workflow' into 'master'

Feat Annual recertification workflow

See merge request rc/self-reg-form!41
parents 081937de 49df1f18
......@@ -58,7 +58,9 @@ def create_app(config_name):
username=session['user'].get('username'),
fullname=session['user'].get('fullname'), email=session['user'].get('email'),
referrer=session['return_url'], cancel_url=vars.default_referrer,
cancel_msg=messages.cancel_message, certification_message=messages.certification_message)
cancel_msg=messages.cancel_message,
pre_certification_msg=messages.pre_certification_message,
certification_msg=messages.certification_message)
elif rc_util.check_state(session['user'].get('username')) == "ok":
return render_template('account/good_standing.html', good_standing_msg= messages.good_standing_message)
......
function preCertification() {
const element = document.getElementById("pre-certify");
element.remove();
var x = document.getElementById("user-recertify");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
function check() {
var submitButton = document.getElementById("submit");
let ckbox = document.getElementById('agree');
submitButton.disabled = !ckbox.checked;
let ckbox1 = document.getElementById('agree1');
let ckbox2 = document.getElementById('agree2');
submitButton.disabled = !(ckbox1.checked && ckbox2.checked);
};
function displayloading1() {
......
......@@ -79,9 +79,16 @@
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Annual Recertification Form </h2>
<p style="font-size:110%;"> {{ certification_message |safe }}</p>
<div id="user-input">
<h2> Annual Recertification</h2>
<div id="pre-certify">
<p style="font-size:110%;"> {{ pre_certification_msg |safe }}</p>
<div class="col-md-7 col-sm-7 my-col">
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account Certification Cancelled','{{ cancel_msg |safe }}', null)">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="preCertification()"> Continue to Certification</button>
</div>
</div>
<div id="user-recertify" style="display: none">
<p style="font-size:110%;"> {{ certification_msg |safe }}</p><br>
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="col-md-7 col-sm-7 my-col">
<label for="username" class="control-label">Blazer Id:</label>&#9;<input id="username" class="form-control" placeholder="Enter Username" required><br>
......@@ -90,15 +97,17 @@
<label for="fullname" class="control-label">Full Name:</label>&#9;<input id="fullname" class="form-control" placeholder="Enter Full Name" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control" placeholder="Enter Email" required><br>
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control" placeholder="Enter Email" required>
</div>
<br>
<div class="col-md-7 col-sm-7 my-col">
<div class="col-md-10 col-sm-10 my-col">
<br><input class="checks" id ="agree1" type="checkbox" name="agree" value="agree" onchange= check() /> I have read & accept UAB IT's <a href="https://secure2.compliancebridge.com/uab/public/index.php?fuseaction=print.preview&docID=786" target="_blank">Acceptable Use Policy</a> and <a href="https://www.uab.edu/it/home/policies/data-classification/classification-overview" target="_blank">Data Classification Policy</a><br/>
<input class="checks" id ="agree2" type="checkbox" name="agree" value="agree" onchange= check() /> I also understand that it is my responsibility to follow all relevant <a href="https://www.uab.edu/it/home/policies" target="_blank">IT policies</a> when using this resource.<br/>
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account Certification Cancelled','{{ cancel_msg |safe }}', null)">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();certify_account()"> Certify Account</button>
<button class="btn btn-primary btn-md" disabled id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();certify_account()"> Certify Account</button>
</div>
</form>
</div>
</div>
</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."
pre_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> To continue with the self certification process click on continue below"
certification_message = "Welcome back to the UAB Research Computing services page.<br>The usage of this resource is governed by UAB IT's <a href=' https://secure2.compliancebridge.com/uab/public/index.php?fuseaction=print.preview&docID=786' target='_blank'>Acceptable Use Policy </a> and <a href='https://www.uab.edu/it/home/policies/data-classification/classification-overview' target='_blank'>Data Classification Policy</a><br>To read and understand all UAB IT policies click <a href=' https://www.uab.edu/it/home/policies' target='_blank'>here</a><br>Verify your information in the form below and hit the Certify Account button when you are done."
good_standing_message= "Your account is in good standing. Click <a href=https://rc.uab.edu>here</a> to proceed to dashboard"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment