mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 18:25:58 +02:00
use filter on address
This commit is contained in:
parent
06b66f4400
commit
cc1dd66553
2 changed files with 14 additions and 8 deletions
|
@ -898,20 +898,26 @@ function initializeWidgetOnList(list, parentId) {
|
|||
const phoneSpan = contactList.querySelector("#contact_info_phone");
|
||||
|
||||
if (titleSpan) {
|
||||
titleSpan.textContent = data.title || "";
|
||||
titleSpan.textContent = data.title || "None";
|
||||
};
|
||||
|
||||
// Update the email field and the content for the clipboard
|
||||
if (emailSpan) {
|
||||
emailSpan.textContent = data.email || "";
|
||||
let copyButton = contactList.querySelector(".admin-icon-group");
|
||||
emailSpan.textContent = data.email || "None";
|
||||
if (data.email) {
|
||||
const clipboardInput = contactList.querySelector(".admin-icon-group input");
|
||||
if (clipboardInput) {
|
||||
clipboardInput.value = data.email || "";
|
||||
clipboardInput.value = data.email;
|
||||
};
|
||||
showElement(copyButton);
|
||||
}else {
|
||||
hideElement(copyButton);
|
||||
}
|
||||
}
|
||||
|
||||
if (phoneSpan) {
|
||||
phoneSpan.textContent = data.phone || "";
|
||||
phoneSpan.textContent = data.phone || "None";
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n static %}
|
||||
{% load custom_filters %}
|
||||
|
||||
<address class="{% if no_title_top_padding %}margin-top-neg-1__detail-list{% endif %} {% if user.has_contact_info %}margin-bottom-1{% endif %} dja-address-contact-list">
|
||||
<address class="{% if no_title_top_padding %}margin-top-neg-1__detail-list{% endif %} {% if user|has_contact_info %}margin-bottom-1{% endif %} dja-address-contact-list">
|
||||
|
||||
|
||||
{% if show_formatted_name %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue