From 93118675db7f9bdfd5d10b36e7199a82a3862723 Mon Sep 17 00:00:00 2001 From: johnyu95 Date: Mon, 30 Oct 2023 16:53:44 -0400 Subject: [PATCH] Removed recaptcha for agency users --- app/main/views.py | 2 +- app/request/views.py | 2 +- app/templates/main/contact.html | 2 +- app/templates/request/new_request_agency.html | 13 +------------ 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/app/main/views.py b/app/main/views.py index 6518cd0f1..2fd6faeb6 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -47,7 +47,7 @@ def status(): @main.route('/technical-support', methods=['GET', 'POST']) def technical_support(): if request.method == 'POST': - if current_app.config['RECAPTCHA_ENABLED']: + if current_app.config['RECAPTCHA_ENABLED'] and not current_user.is_agency: try: # Verify recaptcha token and return error if failed recaptcha_response = requests.post( diff --git a/app/request/views.py b/app/request/views.py index d2f0a1ec7..275558f8a 100644 --- a/app/request/views.py +++ b/app/request/views.py @@ -98,7 +98,7 @@ def new(): new_request_template = "request/new_request_" + template_suffix if flask_request.method == "POST": - if current_app.config['RECAPTCHA_ENABLED']: + if current_app.config['RECAPTCHA_ENABLED'] and not current_user.is_agency: try: # Verify recaptcha token and return error if failed recaptcha_response = requests.post( diff --git a/app/templates/main/contact.html b/app/templates/main/contact.html index 17b3e79d3..70ed77ce5 100644 --- a/app/templates/main/contact.html +++ b/app/templates/main/contact.html @@ -33,7 +33,7 @@

Technical Support

5000 characters remaining


- {% if config['RECAPTCHA_ENABLED'] %} + {% if config['RECAPTCHA_ENABLED'] and not current_user.is_agency %} Address placeholder="12345") }}
- {% if config['RECAPTCHA_ENABLED'] %} - - {% else %} - {{ form.submit(id="submit", class="btn-primary") }} - {% endif %} + {{ form.submit(id="submit", class="btn-primary") }} {% include "request/_pii_warning_modal.html" %}