From 57998a1bb3dc39128fc1d61e2cb040414da1f21a Mon Sep 17 00:00:00 2001 From: Robert McCann Date: Tue, 21 Mar 2023 15:52:40 -0600 Subject: [PATCH] #130, #131, #132 Change "GeoPortal" branding language --- AGOLAccountRequestor/urls.py | 4 ++-- AGOLAccountRequestor/views.py | 4 ++-- README.md | 4 ++-- accounts/admin.py | 10 +++++----- accounts/func.py | 2 +- .../commands/create_reminder_notification.py | 2 +- accounts/management/commands/notify_sponsors.py | 10 +++++----- accounts/models.py | 12 ++++++------ accounts/templates/enabled_account_email.html | 5 +++-- .../enabled_account_email_with_password.html | 2 +- .../templates/new_account_request_email.html | 4 ++-- .../templates/new_response_request_email.html | 4 ++-- .../reminder_pending_account_request_email.html | 4 ++-- accounts/templates/response_approval_email.html | 2 +- accounts/templates/response_disable_email.html | 4 ++-- accounts/templates/signature_line.html | 16 ++++++++-------- templates/field_coord_er_request_email.html | 8 ++++---- templates/field_coord_request_email.html | 5 ++--- templates/invitation_email_body.html | 4 ++-- ui/src/app/app.component.html | 2 +- .../approval-list/approval-list.component.html | 2 +- .../edit-account-props-dialog.component.html | 4 ++-- .../request-field-coord-dialog.component.html | 2 +- .../field-coord-er-request-form.component.html | 6 +++--- ui/src/app/home/home.component.html | 4 ++-- .../request-form/request-form.component.html | 9 ++++----- ...stUserGuide.pdf => AcctRequestUserGuide.pdf} | Bin ui/src/index.html | 2 +- 28 files changed, 68 insertions(+), 69 deletions(-) rename ui/src/assets/{GPOAcctRequestUserGuide.pdf => AcctRequestUserGuide.pdf} (100%) diff --git a/AGOLAccountRequestor/urls.py b/AGOLAccountRequestor/urls.py index e663ca7..448fbaa 100644 --- a/AGOLAccountRequestor/urls.py +++ b/AGOLAccountRequestor/urls.py @@ -35,8 +35,8 @@ router.register('agol/roles', account_views.AGOLRoleViewSet) router.register('notifications', account_views.PendingNotificationViewSet) -admin.site.site_header = "EPA GeoPlatform Account Request Tool" -admin.site.site_title = "GeoPlatform Account Request Tool" +admin.site.site_header = "EPA Account Request Tool" +admin.site.site_title = "Account Request Tool" admin.site.index_title = "Tool Administration" admin.site.site_url = f"/{settings.URL_PREFIX}" diff --git a/AGOLAccountRequestor/views.py b/AGOLAccountRequestor/views.py index aec092f..e9e7bc0 100644 --- a/AGOLAccountRequestor/views.py +++ b/AGOLAccountRequestor/views.py @@ -50,10 +50,10 @@ def email_field_coordinator_request(request): email_context = request.data if 'emergency_response_name' in email_context: html_msg = render_to_string('../templates/field_coord_er_request_email.html', email_context) - email_subject = "Response/Project Request for Review in GeoPlatform Account Request Tool" + email_subject = "Response/Project Request for Review in Account Request Tool" else: html_msg = render_to_string('../templates/field_coord_request_email.html', email_context) - email_subject = "Coordinator Request for Review in GeoPlatform Account Request Tool" + email_subject = "Coordinator Request for Review in Account Request Tool" plain_msg = strip_tags(html_msg) result = send_mail( subject=email_subject, diff --git a/README.md b/README.md index b46a9b5..d73e224 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# GeoPlatform-Request-Tool +# Account-Request-Tool -The GeoPlatform Account Request Tool provisions EPA GeoPlatform (GPO) user accounts during emergency response events and projects. Authorized users (Team Coordinators) can rapidly set up accounts for field data collection events and provide access to specific GeoPlatform groups. +The Account Request Tool provisions EPA GIS user accounts during emergency response events and projects. Authorized users (Team Coordinators) can rapidly set up accounts for field data collection events and provide access to specific groups. diff --git a/accounts/admin.py b/accounts/admin.py index c4ae58f..0843e6b 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -293,7 +293,7 @@ def change_view(self, request, object_id, form_url='', extra_context=None): return response def disable_users_link(self, obj): - return mark_safe(f'Relevant Response/Project GeoPlatform Accounts List') + return mark_safe(f'Relevant Response/Project Accounts List') def get_urls(self): from django.urls import path @@ -327,8 +327,8 @@ def approve_view(self, request, object_id): "to": ', '.join(to), "subject": subject, "email_content": message, - 'site_header': 'EPA GeoPlatform Account Request Tool', - 'site_title': 'GeoPlatform Account Request Tool', + 'site_header': 'EPA Account Request Tool', + 'site_title': 'Account Request Tool', }) def disable_view(self, request, object_id): @@ -353,8 +353,8 @@ def disable_view(self, request, object_id): "to": ', '.join(to), "subject": subject, "email_content": message, - 'site_header': 'EPA GeoPlatform Account Request Tool', - 'site_title': 'GeoPlatform Account Request Tool', + 'site_header': 'EPA Account Request Tool', + 'site_title': 'Account Request Tool', }) diff --git a/accounts/func.py b/accounts/func.py index ad9db38..c115799 100644 --- a/accounts/func.py +++ b/accounts/func.py @@ -93,7 +93,7 @@ def enable_account(account_request, password): context={"username": account_request.username, "response": account_request.response.name, "approved_by": account_request.approved_by}, - subject="Your EPA Geoplatform Account has been enabled", + subject=f"Your EPA {account_request.response.portal} Account has been enabled", to=[account_request.email], content_object=account_request) return True diff --git a/accounts/management/commands/create_reminder_notification.py b/accounts/management/commands/create_reminder_notification.py index 6bb485d..33827a7 100644 --- a/accounts/management/commands/create_reminder_notification.py +++ b/accounts/management/commands/create_reminder_notification.py @@ -15,7 +15,7 @@ def handle(self, *args, **options): for pending in pending_accounts: Notification.create_new_notification( - subject='Pending GeoPlatform Account Requests', + subject='Pending Account Requests', context={ "HOST_ADDRESS": settings.HOST_ADDRESS, "count": pending.total_pending diff --git a/accounts/management/commands/notify_sponsors.py b/accounts/management/commands/notify_sponsors.py index 9472020..bbd2a34 100644 --- a/accounts/management/commands/notify_sponsors.py +++ b/accounts/management/commands/notify_sponsors.py @@ -15,14 +15,14 @@ def handle(self, *args, **options): to_emails = list(AGOLUserFields.objects.values_list('delegates__email', flat=True)) to_emails.append(notification['sponsor__email']) results = send_mail( - 'Pending GeoPlatform Account Requests', - f'{notification["total"]} GeoPlatform Account Request(s) is pending your approval in the GeoPlatform Account Request Tool.' - f'Please log in to the GeoPlatform Account Request Tool Approval List to configure new GeoPlatform accounts and notify the users when configuration is complete.', + 'Pending Account Requests', + f'{notification["total"]} Account Request(s) is pending your approval in the Account Request Tool.' + f'Please log in to the Account Request Tool Approval List to configure new accounts and notify the users when configuration is complete.', 'GIS_Team@epa.gov', list(set(to_emails)), fail_silently=False, - html_message=f'{notification["total"]} GeoPlatform Account Request(s) is pending your approval in the GeoPlatform Account Request Tool.' - f'Please log in to the GeoPlatform Account Request Tool Approval List to configure new GeoPlatform accounts and notify the users when configuration is complete.', + html_message=f'{notification["total"]} Account Request(s) is pending your approval in the Account Request Tool.' + f'Please log in to the Account Request Tool Approval List to configure new accounts and notify the users when configuration is complete.', ) if results == 1: AccountRequests.objects.filter( diff --git a/accounts/models.py b/accounts/models.py index 10c1669..8dae7f4 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -70,7 +70,7 @@ def sponsor_notified(self): def create_new_notification(self): Notification.create_new_notification( - subject='New GeoPlatform Account Request', + subject=f'New {self.response.portal} Account Request', context={"HOST_ADDRESS": settings.HOST_ADDRESS}, template="new_account_request_email.html", content_object=self, @@ -434,12 +434,12 @@ def __init__(self, *args, **kwargs): name = models.CharField('Name', max_length=500) portal = models.ForeignKey(AGOL, models.PROTECT, default=1) assignable_groups = models.ManyToManyField('AGOLGroup', related_name='response', - verbose_name='GeoPlatform Assignable Groups') + verbose_name='Assignable Groups') role = models.ForeignKey('AGOLRole', on_delete=models.PROTECT, verbose_name='GeoPlatform Role', limit_choices_to={'is_available': True}, null=True, blank=True, help_text='System default will be used if left blank.') authoritative_group = models.ForeignKey('AGOLGroup', on_delete=models.PROTECT, - verbose_name='Geoplatform Authoritative Group', + verbose_name='Authoritative Group', limit_choices_to={'is_auth_group': True}) disabled = models.DateTimeField(null=True, blank=True) disabled_by = models.ForeignKey(User, models.PROTECT, 'disabled_responses', null=True, blank=True) @@ -500,7 +500,7 @@ def save(self, *args, **kwargs): def generate_new_email(self): REQUEST_URL = f"{settings.HOST_ADDRESS}/api/admin/accounts/responseproject/{self.pk}" to = [x.email.lower() for x in User.objects.filter(groups__pk=settings.COORDINATOR_ADMIN_GROUP_ID)] - subject = 'New Response/Project Request for Review in GeoPlatform Account Request Tool' + subject = f'New {self.portal} Response/Project Request for Review in Account Request Tool' content = render_to_string('new_response_request_email.html', {"REQUEST_URL": REQUEST_URL}) return to, subject, content @@ -515,7 +515,7 @@ def generate_approval_email(self): recipients = self.get_email_recipients() request_url = f"{settings.HOST_ADDRESS}?response={self.pk}" approval_url = f"{settings.HOST_ADDRESS}/accounts/list" - email_subject = f"GeoPlatform Account Response/Project {self.name} has been approved" + email_subject = f"{self.portal} Account Response/Project {self.name} has been approved" msg = render_to_string('response_approval_email.html', { "response_project": self, "request_url": request_url, @@ -532,7 +532,7 @@ def generate_approval_email(self): def generate_disable_email(self): try: recipients = self.get_email_recipients() - email_subject = f"GeoPlatform Account Response/Project {self.name} has been disabled" + email_subject = f"{self.portal} Account Response/Project {self.name} has been disabled" msg = render_to_string('response_disable_email.html', {"response_project": self}) return recipients, email_subject, msg diff --git a/accounts/templates/enabled_account_email.html b/accounts/templates/enabled_account_email.html index f24bffa..e60fe45 100644 --- a/accounts/templates/enabled_account_email.html +++ b/accounts/templates/enabled_account_email.html @@ -1,7 +1,8 @@ -Your EPA GeoPlatform acount, {{ username }}, has been enabled as part of the {{ response }} response / project. +Your EPA {{ response_project.portal }} account, {{ username }}, has been enabled as part of the {{ response }} response / project.

If you no longer know your account password please go to the -EPA Geoplatform Sign In page and click +{{ base_url }} +EPA {{ response_project.portal }} Sign In page and click "Forgot password?". {% include "signature_line.html" %} diff --git a/accounts/templates/enabled_account_email_with_password.html b/accounts/templates/enabled_account_email_with_password.html index 19469c0..db2d526 100644 --- a/accounts/templates/enabled_account_email_with_password.html +++ b/accounts/templates/enabled_account_email_with_password.html @@ -1,4 +1,4 @@ -Your EPA GeoPlatform acount, {{ username }}, has been enabled as part of the {{ response }} response / project. +Your EPA account, {{ username }}, has been enabled as part of the {{ response }} response / project.

Your password has been reset by the response / project by {{ approved_by.first_name }} {{ approved_by.last_name }} ({{ approved_by.email }}). diff --git a/accounts/templates/new_account_request_email.html b/accounts/templates/new_account_request_email.html index 316b69f..480037c 100644 --- a/accounts/templates/new_account_request_email.html +++ b/accounts/templates/new_account_request_email.html @@ -1,5 +1,5 @@ -You have a new GeoPlatform Account Request pending your approval in the GeoPlatform Account Request Tool ({{ HOST_ADDRESS }}). +You have a new {{ response_project.portal }} Account Request pending your approval in the Account Request Tool ({{ HOST_ADDRESS }}).

-Please log in to the GeoPlatform Account Request Tool Approval List to review your GeoPlatform account requests. +Please log in to the Account Request Tool Approval List to review your account requests. {% include "signature_line.html" %} diff --git a/accounts/templates/new_response_request_email.html b/accounts/templates/new_response_request_email.html index 7afb18e..0b327d2 100644 --- a/accounts/templates/new_response_request_email.html +++ b/accounts/templates/new_response_request_email.html @@ -1,4 +1,4 @@ -An Emergency Response Request or Project has been submitted to the GeoPlatform Account Request Tool (r9data.response.epa.gov/request). +An Emergency Response Request or Project has been submitted to the Account Request Tool (r9data.response.epa.gov/request). -Please log in to the GeoPlatform Account Request Tool Administration to review the pending request: +Please log in to the Account Request Tool Administration to review the pending request: {{ REQUEST_URL }} diff --git a/accounts/templates/reminder_pending_account_request_email.html b/accounts/templates/reminder_pending_account_request_email.html index 23977f3..175c870 100644 --- a/accounts/templates/reminder_pending_account_request_email.html +++ b/accounts/templates/reminder_pending_account_request_email.html @@ -1,5 +1,5 @@ -You have {{ count }} GeoPlatform Account Request{% if count > 1 %}s{% endif %} pending your approval in the GeoPlatform Account Request Tool ({{ HOST_ADDRESS }}). +You have {{ count }} Account Request{% if count > 1 %}s{% endif %} pending your approval in the Account Request Tool ({{ HOST_ADDRESS }}).

-Please log in to the GeoPlatform Account Request Tool Approval List to review your GeoPlatform account requests. +Please log in to the Account Request Tool Approval List to review your account requests. {% include "signature_line.html" %} diff --git a/accounts/templates/response_approval_email.html b/accounts/templates/response_approval_email.html index d739d51..b5aa1d3 100644 --- a/accounts/templates/response_approval_email.html +++ b/accounts/templates/response_approval_email.html @@ -1,4 +1,4 @@ -The GeoPlatform Account Request Tool Response/Project {{ response_project.name }} has been approved. +The Account Request Tool Response/Project {{ response_project.name }} has been approved.