Minor improvements

This commit is contained in:
zandercymatics 2024-01-05 15:37:48 -07:00
parent d9151febcf
commit dcc8f99553
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 9 additions and 7 deletions

View file

@ -32,8 +32,8 @@
// Fix margins in mobile view
@media screen {
td.tablet-margin-top-5 {
margin-top: 40px !important;
td.tablet-margin-top-2 {
margin-top: 16px !important;
}
}
}

View file

@ -147,7 +147,7 @@
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
<use xlink:href="{%static 'img/sprite.svg'%}#edit"></use>
</svg>
Edit <span class="usa-sr-only">{{ application.requested_domain.name|default:"New domain request"|add:forloop.counter|add:"" }} </span>
Edit <span class="usa-sr-only">{{ application.requested_domain.name|default:"New domain request" }} </span>
{% else %}
<a href="{% url 'application-status' application.pk %}">
@ -159,7 +159,7 @@
</a>
</td>
{% if has_deletable_applications %}
<td class="tablet-margin-top-5">
<td class="tablet-margin-top-2">
{% if application.status == "started" or application.status == "withdrawn" %}
<a
id="button-toggle-delete-domain-alert-{{ forloop.counter }}"

View file

@ -89,8 +89,8 @@ class LoggedInTests(TestWithUser):
application = DomainApplication.objects.create(creator=self.user, requested_domain=site)
response = self.client.get("/")
# count = 6 because it is also in screenreader content, and in the delete modal
self.assertContains(response, "igorville.gov", count=6)
# count = 4 because it is also in screenreader content, and in the delete modal
self.assertContains(response, "igorville.gov", count=4)
# clean up
application.delete()

View file

@ -587,10 +587,12 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
return False
status = self.get_object().status
if status not in [DomainApplication.ApplicationStatus.WITHDRAWN, DomainApplication.ApplicationStatus.STARTED]:
valid_statuses = [DomainApplication.ApplicationStatus.WITHDRAWN, DomainApplication.ApplicationStatus.STARTED]
if status not in valid_statuses:
return False
return True
def get_success_url(self):
"""After a delete is successful, redirect to home"""
return reverse("home")