mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 00:42:16 +02:00
Minor improvements
This commit is contained in:
parent
d9151febcf
commit
dcc8f99553
4 changed files with 9 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue