Merge pull request #1315 from cisagov/dk/1214-move-hold-button

Issue #1214 - de-emphasize place / remove hold, as well as remove from registry
This commit is contained in:
dave-kennedy-ecs 2023-11-13 12:49:55 -05:00 committed by GitHub
commit dcbb54f799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 13 deletions

View file

@ -161,6 +161,26 @@ h1, h2, h3 {
font-size: 14px;
}
// right justify custom buttons and display as links
.submit-row input.custom-link-button,
.submit-row input.custom-link-button:hover {
background: none;
border: none;
color: var(--link-fg);
cursor: pointer;
text-decoration: none;
padding: 0;
font-size: inherit;
margin-left: auto;
}
.submit-row div.spacer {
flex-grow: 1;
}
.submit-row span {
margin-top: units(1);
}
// Customize
// Keep th from collapsing
.min-width-25 {
min-width: 25px;

View file

@ -8,15 +8,19 @@
{% block field_sets %}
<div class="submit-row">
{% if original.state == original.State.READY %}
<input type="submit" value="Place hold" name="_place_client_hold">
{% elif original.state == original.State.ON_HOLD %}
<input type="submit" value="Remove hold" name="_remove_client_hold">
{% endif %}
<input id="manageDomainSubmitButton" type="submit" value="Manage domain" name="_edit_domain">
<input type="submit" value="Get registry status" name="_get_status">
<div class="spacer"></div>
{% if original.state == original.State.READY %}
<input type="submit" value="Place hold" name="_place_client_hold" class="custom-link-button">
{% elif original.state == original.State.ON_HOLD %}
<input type="submit" value="Remove hold" name="_remove_client_hold" class="custom-link-button">
{% endif %}
{% if original.state == original.State.READY or original.state == original.State.ON_HOLD %}
<span> | </span>
{% endif %}
{% if original.state != original.State.DELETED %}
<input type="submit" value="Delete domain in registry" name="_delete_domain">
<input type="submit" value="Remove from registry" name="_delete_domain" class="custom-link-button">
{% endif %}
</div>
{{ block.super }}

View file

@ -128,12 +128,12 @@ class TestDomainAdmin(MockEppLib):
)
self.assertEqual(response.status_code, 200)
self.assertContains(response, domain.name)
self.assertContains(response, "Delete domain in registry")
self.assertContains(response, "Remove from registry")
# Test the info dialog
request = self.factory.post(
"/admin/registrar/domain/{}/change/".format(domain.pk),
{"_delete_domain": "Delete domain in registry", "name": domain.name},
{"_delete_domain": "Remove from registry", "name": domain.name},
follow=True,
)
request.user = self.client
@ -168,12 +168,12 @@ class TestDomainAdmin(MockEppLib):
)
self.assertEqual(response.status_code, 200)
self.assertContains(response, domain.name)
self.assertContains(response, "Delete domain in registry")
self.assertContains(response, "Remove from registry")
# Test the error
request = self.factory.post(
"/admin/registrar/domain/{}/change/".format(domain.pk),
{"_delete_domain": "Delete domain in registry", "name": domain.name},
{"_delete_domain": "Remove from registry", "name": domain.name},
follow=True,
)
request.user = self.client
@ -213,12 +213,12 @@ class TestDomainAdmin(MockEppLib):
)
self.assertEqual(response.status_code, 200)
self.assertContains(response, domain.name)
self.assertContains(response, "Delete domain in registry")
self.assertContains(response, "Remove from registry")
# Test the info dialog
request = self.factory.post(
"/admin/registrar/domain/{}/change/".format(domain.pk),
{"_delete_domain": "Delete domain in registry", "name": domain.name},
{"_delete_domain": "Remove from registry", "name": domain.name},
follow=True,
)
request.user = self.client
@ -240,7 +240,7 @@ class TestDomainAdmin(MockEppLib):
# Test the info dialog
request = self.factory.post(
"/admin/registrar/domain/{}/change/".format(domain.pk),
{"_delete_domain": "Delete domain in registry", "name": domain.name},
{"_delete_domain": "Remove from registry", "name": domain.name},
follow=True,
)
request.user = self.client