From 466d3bbc25f79788919652c9efd28683d7a8f96e Mon Sep 17 00:00:00 2001 From: Krish M <krish94@uab.edu> Date: Thu, 19 May 2022 09:30:15 -0500 Subject: [PATCH 1/2] Feat-Add checkbox to self-registration page 1. Added 2 checkboxes to self-reg page 2. Send updated_by value to add_account --- app/templates/auth/SignUp.html | 9 ++++----- tasks.py | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/templates/auth/SignUp.html b/app/templates/auth/SignUp.html index ce1361a..b378090 100644 --- a/app/templates/auth/SignUp.html +++ b/app/templates/auth/SignUp.html @@ -96,12 +96,11 @@ <textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required></textarea> </div> <br> - <div class="col-md-7 col-sm-7 my-col"> -<!-- - <br><input class="checks" id ="agree" type="checkbox" name="agree" value="agree" onchange= check() />Agree to proceed<br/> ---!> + <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 Creation Cancelled','{{ cancel_msg |safe }}', null)">Cancel</button> - <button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button> + <button class="btn btn-primary btn-md" disabled id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button> </div> </form> </div> diff --git a/tasks.py b/tasks.py index 72539c9..1c42ee2 100644 --- a/tasks.py +++ b/tasks.py @@ -72,13 +72,14 @@ def celery_create_account(json, session): email= json['email'] fullname= json['fullname'] reason= json['reason'] -# aup= json['aup'] queuename= rc_util.encode_name(username) + updated_by= f'{username}' + host= 'login005' print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue') send_msg('creating account', room) print(username) - rc_util.add_account(username, queuename, email, fullname, reason) + rc_util.add_account(username, queuename, email, fullname, reason, updated_by, host) print('sent account info') print('Waiting for completion...') rc_util.consume(queuename, routing_key=f'complete.{queuename}', callback=gen_f(room)) -- GitLab From c3da0da71078ec2880cf668ca9179c4e9fb91ba8 Mon Sep 17 00:00:00 2001 From: Krish M <krish94@uab.edu> Date: Thu, 19 May 2022 11:08:51 -0500 Subject: [PATCH 2/2] added variable for app_host --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 1c42ee2..a0f72f8 100644 --- a/tasks.py +++ b/tasks.py @@ -74,7 +74,7 @@ def celery_create_account(json, session): reason= json['reason'] queuename= rc_util.encode_name(username) updated_by= f'{username}' - host= 'login005' + host= vars.app_host print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue') send_msg('creating account', room) -- GitLab