mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-05 18:53:28 +02:00
Merge branch 'main' into za/2671-show-portfolios-on-user-table
This commit is contained in:
commit
47e8934cde
8 changed files with 35 additions and 11 deletions
|
@ -519,7 +519,6 @@ function initializeWidgetOnList(list, parentId) {
|
||||||
var actionNeededEmailReadonlyTextarea = document.querySelector("#action-needed-reason-email-readonly-textarea")
|
var actionNeededEmailReadonlyTextarea = document.querySelector("#action-needed-reason-email-readonly-textarea")
|
||||||
|
|
||||||
// Edit e-mail modal (and its confirmation button)
|
// Edit e-mail modal (and its confirmation button)
|
||||||
var actionNeededEmailAlreadySentModal = document.querySelector("#email-already-sent-modal")
|
|
||||||
var confirmEditEmailButton = document.querySelector("#email-already-sent-modal_continue-editing-button")
|
var confirmEditEmailButton = document.querySelector("#email-already-sent-modal_continue-editing-button")
|
||||||
|
|
||||||
// Headers and footers (which change depending on if the e-mail was sent or not)
|
// Headers and footers (which change depending on if the e-mail was sent or not)
|
||||||
|
@ -561,11 +560,11 @@ function initializeWidgetOnList(list, parentId) {
|
||||||
updateActionNeededEmailDisplay(reason)
|
updateActionNeededEmailDisplay(reason)
|
||||||
});
|
});
|
||||||
|
|
||||||
editEmailButton.addEventListener("click", function() {
|
// editEmailButton.addEventListener("click", function() {
|
||||||
if (!checkEmailAlreadySent()) {
|
// if (!checkEmailAlreadySent()) {
|
||||||
showEmail(canEdit=true)
|
// showEmail(canEdit=true)
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
confirmEditEmailButton.addEventListener("click", function() {
|
confirmEditEmailButton.addEventListener("click", function() {
|
||||||
// Show editable view
|
// Show editable view
|
||||||
|
|
|
@ -546,7 +546,7 @@ button .usa-icon,
|
||||||
#submitRowToggle {
|
#submitRowToggle {
|
||||||
color: var(--body-fg);
|
color: var(--body-fg);
|
||||||
}
|
}
|
||||||
.requested-domain-sticky {
|
.submit-row-sticky {
|
||||||
max-width: 325px;
|
max-width: 325px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
|
@ -295,7 +295,7 @@ class UserFixture:
|
||||||
logger.warning(f"Could not add email to whitelist for {first_name} {last_name}.")
|
logger.warning(f"Could not add email to whitelist for {first_name} {last_name}.")
|
||||||
|
|
||||||
# Load additional emails
|
# Load additional emails
|
||||||
allowed_emails.extend(additional_emails)
|
allowed_emails.extend([AllowedEmail(email=email) for email in additional_emails])
|
||||||
|
|
||||||
if allowed_emails:
|
if allowed_emails:
|
||||||
AllowedEmail.objects.bulk_create(allowed_emails)
|
AllowedEmail.objects.bulk_create(allowed_emails)
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p class="padding-top-05 text-right margin-top-2 padding-right-2 margin-bottom-0 requested-domain-sticky float-right visible-768">
|
<p class="padding-top-05 text-right margin-top-2 padding-right-2 margin-bottom-0 submit-row-sticky float-right visible-768">
|
||||||
Requested domain: <strong>{{ original.requested_domain.name }}</strong>
|
Requested domain: <strong>{{ original.requested_domain.name }}</strong>
|
||||||
</p>
|
</p>
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<p>This table is an email whitelist for <strong>non-production</strong> environments.</p>
|
<p>This table is an email allow list for <strong>non-production</strong> environments.</p>
|
||||||
<p>
|
<p>
|
||||||
If an email is sent out and the email does not exist within this table (or is not a subset of it),
|
If an email is sent out and the email does not exist within this table (or is not a subset of it),
|
||||||
then no email will be sent.
|
then no email will be sent.
|
||||||
|
|
|
@ -330,7 +330,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% elif field.field.name == "state_territory" %}
|
{% elif field.field.name == "state_territory" and original_object|model_name_lowercase != 'portfolio' %}
|
||||||
<div class="flex-container margin-top-2">
|
<div class="flex-container margin-top-2">
|
||||||
<span>
|
<span>
|
||||||
CISA region:
|
CISA region:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
||||||
|
{% load custom_filters %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -23,3 +24,22 @@
|
||||||
{% include "django/admin/includes/detail_table_fieldset.html" with original_object=original %}
|
{% include "django/admin/includes/detail_table_fieldset.html" with original_object=original %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block submit_buttons_bottom %}
|
||||||
|
<div class="submit-row-wrapper">
|
||||||
|
<span class="submit-row-toggle padding-1 padding-right-2 visible-desktop">
|
||||||
|
<button type="button" class="usa-button usa-button--unstyled" id="submitRowToggle">
|
||||||
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
||||||
|
<use xlink:href="{%static 'img/sprite.svg'%}#expand_more"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Hide</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<p class="padding-top-05 text-right margin-top-2 padding-right-2 margin-bottom-0 submit-row-sticky float-right visible-768">
|
||||||
|
Organization Name: <strong>{{ original.organization_name }}</strong>
|
||||||
|
</p>
|
||||||
|
{{ block.super }}
|
||||||
|
</div>
|
||||||
|
<span class="scroll-indicator"></span>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -169,3 +169,8 @@ def has_contact_info(user):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return bool(user.title or user.email or user.phone)
|
return bool(user.title or user.email or user.phone)
|
||||||
|
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def model_name_lowercase(instance):
|
||||||
|
return instance.__class__.__name__.lower()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue