mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-28 05:26:28 +02:00
fix copy button on other contacts and more cleanup
This commit is contained in:
parent
dd29081fff
commit
c878e7aebb
8 changed files with 23 additions and 17 deletions
|
@ -3116,7 +3116,7 @@ class PortfolioAdmin(ListHeaderAdmin):
|
||||||
admin_details += f"<input aria-hidden='true' class='display-none' value='{escape(portfolio_admin.email)}'>"
|
admin_details += f"<input aria-hidden='true' class='display-none' value='{escape(portfolio_admin.email)}'>"
|
||||||
admin_details += (
|
admin_details += (
|
||||||
"<button class='usa-button usa-button--unstyled padding-right-1 usa-button--icon padding-left-05"
|
"<button class='usa-button usa-button--unstyled padding-right-1 usa-button--icon padding-left-05"
|
||||||
+ "button--clipboard copy-to-clipboard text-no-underline' type='button'>"
|
+ "copy-to-clipboard text-no-underline' type='button'>"
|
||||||
)
|
)
|
||||||
admin_details += "<svg class='usa-icon'>"
|
admin_details += "<svg class='usa-icon'>"
|
||||||
admin_details += "<use aria-hidden='true' xlink:href='/public/img/sprite.svg#content_copy'></use>"
|
admin_details += "<use aria-hidden='true' xlink:href='/public/img/sprite.svg#content_copy'></use>"
|
||||||
|
|
|
@ -383,6 +383,7 @@ a.button,
|
||||||
font-kerning: auto;
|
font-kerning: auto;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
.button svg,
|
.button svg,
|
||||||
.button span,
|
.button span,
|
||||||
|
@ -422,13 +423,6 @@ input[type=submit].button--dja-toolbar {
|
||||||
input[type=submit].button--dja-toolbar:focus, input[type=submit].button--dja-toolbar:hover {
|
input[type=submit].button--dja-toolbar:focus, input[type=submit].button--dja-toolbar:hover {
|
||||||
border-color: var(--body-quiet-color);
|
border-color: var(--body-quiet-color);
|
||||||
}
|
}
|
||||||
// Targets the DJA buttom with a nested icon
|
|
||||||
button .usa-icon,
|
|
||||||
.button .usa-icon,
|
|
||||||
.button--clipboard .usa-icon {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
// Make the clipboard button "float" inside of the input box
|
|
||||||
.admin-icon-group {
|
.admin-icon-group {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
@ -441,7 +435,6 @@ button .usa-icon,
|
||||||
|
|
||||||
button {
|
button {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1000px) {
|
@media (max-width: 1000px) {
|
||||||
|
@ -857,6 +850,9 @@ div.dja__model-description{
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.padding-bottom-0 {
|
||||||
|
padding-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-container {
|
.flex-container {
|
||||||
@media screen and (min-width: 700px) and (max-width: 1150px) {
|
@media screen and (min-width: 700px) and (max-width: 1150px) {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</li>
|
</li>
|
||||||
{% if opts.model_name == 'domainrequest' %}
|
{% if opts.model_name == 'domainrequest' %}
|
||||||
<li>
|
<li>
|
||||||
<a id="id-copy-to-clipboard-summary" class="usa-button--dja button--clipboard" type="button" href="#">
|
<a id="id-copy-to-clipboard-summary" class="usa-button--dja" type="button" href="#">
|
||||||
<svg class="usa-icon" >
|
<svg class="usa-icon" >
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
|
<use xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
@ -8,7 +8,7 @@ Template for an input field with a clipboard
|
||||||
<div class="admin-icon-group">
|
<div class="admin-icon-group">
|
||||||
{{ field }}
|
{{ field }}
|
||||||
<button
|
<button
|
||||||
class="usa-button--dja usa-button usa-button__small-text usa-button--unstyled padding-left-1 usa-button--icon button--clipboard copy-to-clipboard"
|
class="usa-button--dja usa-button usa-button__small-text usa-button--unstyled padding-left-1 usa-button--icon copy-to-clipboard"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div class="no-outline-on-click">
|
<div class="no-outline-on-click">
|
||||||
|
@ -27,7 +27,7 @@ Template for an input field with a clipboard
|
||||||
<input aria-hidden="true" class="display-none" value="{{ field.email }}" />
|
<input aria-hidden="true" class="display-none" value="{{ field.email }}" />
|
||||||
{% if field.email is not None %}
|
{% if field.email is not None %}
|
||||||
<button
|
<button
|
||||||
class="usa-button--dja usa-button usa-button__small-text usa-button--unstyled padding-right-1 usa-button--icon button--clipboard copy-to-clipboard text-no-underline padding-left-05"
|
class="usa-button--dja usa-button usa-button__small-text usa-button--unstyled padding-right-1 usa-button--icon copy-to-clipboard text-no-underline padding-left-05"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
@ -40,4 +40,4 @@ Template for an input field with a clipboard
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -269,7 +269,17 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
||||||
<td class="padding-left-1 text-size-small">
|
<td class="padding-left-1 text-size-small">
|
||||||
<input aria-hidden="true" class="display-none" value="{{ contact.email }}" />
|
<input aria-hidden="true" class="display-none" value="{{ contact.email }}" />
|
||||||
<button
|
<button
|
||||||
class="usa-button--dja usa-button usa-button__small-text usa-button--unstyled padding-right-1 usa-button--icon button--clipboard copy-to-clipboard usa-button__small-text text-no-underline"
|
class="
|
||||||
|
usa-button--dja
|
||||||
|
usa-button
|
||||||
|
usa-button__small-text
|
||||||
|
usa-button--unstyled
|
||||||
|
padding-right-1
|
||||||
|
padding-top-0
|
||||||
|
padding-bottom-0
|
||||||
|
usa-button--icon
|
||||||
|
copy-to-clipboard
|
||||||
|
text-no-underline"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|
|
@ -654,7 +654,7 @@ class TestDomainInformationAdmin(TestCase):
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
||||||
|
|
||||||
# Test for the copy link
|
# Test for the copy link
|
||||||
self.assertContains(response, "button--clipboard", count=3)
|
self.assertContains(response, "copy-to-clipboard", count=3)
|
||||||
|
|
||||||
# cleanup this test
|
# cleanup this test
|
||||||
domain_info.delete()
|
domain_info.delete()
|
||||||
|
|
|
@ -535,7 +535,7 @@ class TestDomainAdminWithClient(TestCase):
|
||||||
self.assertContains(response, "Testy Tester")
|
self.assertContains(response, "Testy Tester")
|
||||||
|
|
||||||
# Test for the copy link
|
# Test for the copy link
|
||||||
self.assertContains(response, "button--clipboard")
|
self.assertContains(response, "copy-to-clipboard)
|
||||||
|
|
||||||
# cleanup from this test
|
# cleanup from this test
|
||||||
domain.delete()
|
domain.delete()
|
||||||
|
|
|
@ -1511,7 +1511,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
||||||
|
|
||||||
# Test for the copy link
|
# Test for the copy link
|
||||||
self.assertContains(response, "button--clipboard", count=4)
|
self.assertContains(response, "copy-to-clipboard", count=4)
|
||||||
|
|
||||||
# Test that Creator counts display properly
|
# Test that Creator counts display properly
|
||||||
self.assertNotContains(response, "Approved domains")
|
self.assertNotContains(response, "Approved domains")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue