mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 18:25:58 +02:00
Fix async bug + fix sent bug
This commit is contained in:
parent
ece672e41e
commit
c2ac5a1e9a
2 changed files with 7 additions and 2 deletions
|
@ -582,6 +582,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
|
||||
dropdown.addEventListener("change", function() {
|
||||
const reason = dropdown.value;
|
||||
// Update the UI
|
||||
updateUserInterface(reason);
|
||||
if (reason && reason !== "other") {
|
||||
// If it's not the initial value
|
||||
if (initialDropdownValue !== dropdown.value || initialEmailValue !== textarea.value) {
|
||||
|
@ -596,6 +598,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
}else {
|
||||
textarea.value = data.action_needed_email;
|
||||
}
|
||||
updateUserInterface(reason);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Error action needed email: ", error)
|
||||
|
@ -603,8 +606,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
}
|
||||
}
|
||||
|
||||
// Update the UI
|
||||
updateUserInterface(reason);
|
||||
});
|
||||
|
||||
modalConfirm.addEventListener("click", () => {
|
||||
|
|
|
@ -219,7 +219,11 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% if original_object.action_needed_reason_email %}
|
||||
<input id="last-sent-email-content" class="display-none" value="{{original_object.action_needed_reason_email}}">
|
||||
{% else %}
|
||||
<input id="last-sent-email-content" class="display-none" value="None">
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{{ field.field }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue