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 // Fix margins in mobile view
@media screen { @media screen {
td.tablet-margin-top-5 { td.tablet-margin-top-2 {
margin-top: 40px !important; margin-top: 16px !important;
} }
} }
} }

View file

@ -147,7 +147,7 @@
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24"> <svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
<use xlink:href="{%static 'img/sprite.svg'%}#edit"></use> <use xlink:href="{%static 'img/sprite.svg'%}#edit"></use>
</svg> </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 %} {% else %}
<a href="{% url 'application-status' application.pk %}"> <a href="{% url 'application-status' application.pk %}">
@ -159,7 +159,7 @@
</a> </a>
</td> </td>
{% if has_deletable_applications %} {% if has_deletable_applications %}
<td class="tablet-margin-top-5"> <td class="tablet-margin-top-2">
{% if application.status == "started" or application.status == "withdrawn" %} {% if application.status == "started" or application.status == "withdrawn" %}
<a <a
id="button-toggle-delete-domain-alert-{{ forloop.counter }}" 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) application = DomainApplication.objects.create(creator=self.user, requested_domain=site)
response = self.client.get("/") response = self.client.get("/")
# count = 6 because it is also in screenreader content, and in the delete modal # count = 4 because it is also in screenreader content, and in the delete modal
self.assertContains(response, "igorville.gov", count=6) self.assertContains(response, "igorville.gov", count=4)
# clean up # clean up
application.delete() application.delete()

View file

@ -587,10 +587,12 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
return False return False
status = self.get_object().status 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 False
return True return True
def get_success_url(self): def get_success_url(self):
"""After a delete is successful, redirect to home"""
return reverse("home") return reverse("home")