mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 08:52:16 +02:00
Cleanup
This commit is contained in:
parent
f6e82c7a98
commit
bac9dc94aa
1 changed files with 4 additions and 3 deletions
|
@ -530,7 +530,7 @@ function initializeWidgetOnList(list, parentId) {
|
|||
let actionNeededEmail = document.querySelector("#id_action_needed_reason_email");
|
||||
let actionNeededEmailData = document.getElementById('action-needed-emails-data').textContent;
|
||||
let noEmailMessage = document.getElementById("no-email-message");
|
||||
const emptyReasonText = "---------"
|
||||
const emptyReasonText = "-"
|
||||
const noEmailText = "No email will be sent."
|
||||
if(actionNeededReasonDropdown && actionNeededEmail && actionNeededEmailData) {
|
||||
// Add a change listener to the action needed reason dropdown
|
||||
|
@ -558,9 +558,10 @@ function initializeWidgetOnList(list, parentId) {
|
|||
|
||||
// Show the "no email will be sent" text only if a reason is actually selected.
|
||||
noEmailMessage.innerHTML = reason ? noEmailText : emptyReasonText;
|
||||
console.log(`reaso: ${reason} vs in ${reason in actionNeededEmailsJson}`)
|
||||
console.log(noEmailMessage)
|
||||
if (reason && reason in actionNeededEmailsJson) {
|
||||
let emailData = actionNeededEmailsJson[reason];
|
||||
let emailBody = emailData.email_body_text
|
||||
let emailBody = actionNeededEmailsJson[reason];
|
||||
if (emailBody) {
|
||||
// Show the email
|
||||
actionNeededEmail.value = emailBody
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue