mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 12:39:43 +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
|
// 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 }}"
|
||||||
|
|
|
@ -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()
|
||||||
|
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue