Merge pull request #2109 from cisagov/za/2014-current-websites-new-tab

(on getgov-meoward) Ticket #2014: Add target="_blank" to current websites so they open in a new tab
This commit is contained in:
zandercymatics 2024-05-03 08:49:10 -06:00 committed by GitHub
commit 914795efaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
<div class="readonly">
{% with total_websites=field.contents|split:", " %}
{% for website in total_websites %}
<a href="{{ website }}" class="padding-top-1 current-website__{{forloop.counter}}">{{ website }}</a>{% if not forloop.last %}, {% endif %}
<a href="{{ website }}" target="_blank" class="padding-top-1 current-website__{{forloop.counter}}">{{ website }}</a>{% if not forloop.last %}, {% endif %}
{# Acts as a <br> #}
{% if total_websites|length < 5 %}
<div class="display-block margin-top-1"></div>

View file

@ -1886,7 +1886,7 @@ class TestDomainRequestAdmin(MockEppLib):
self.assertContains(response, domain_request.requested_domain.name)
# Check that the page contains the link we expect.
expected_url = '<a href="city.com" class="padding-top-1 current-website__1">city.com</a>'
expected_url = '<a href="city.com" target="_blank" class="padding-top-1 current-website__1">city.com</a>'
self.assertContains(response, expected_url)
@less_console_noise_decorator