mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 20:49:41 +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 actionNeededEmail = document.querySelector("#id_action_needed_reason_email");
|
||||||
let actionNeededEmailData = document.getElementById('action-needed-emails-data').textContent;
|
let actionNeededEmailData = document.getElementById('action-needed-emails-data').textContent;
|
||||||
let noEmailMessage = document.getElementById("no-email-message");
|
let noEmailMessage = document.getElementById("no-email-message");
|
||||||
const emptyReasonText = "---------"
|
const emptyReasonText = "-"
|
||||||
const noEmailText = "No email will be sent."
|
const noEmailText = "No email will be sent."
|
||||||
if(actionNeededReasonDropdown && actionNeededEmail && actionNeededEmailData) {
|
if(actionNeededReasonDropdown && actionNeededEmail && actionNeededEmailData) {
|
||||||
// Add a change listener to the action needed reason dropdown
|
// 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.
|
// Show the "no email will be sent" text only if a reason is actually selected.
|
||||||
noEmailMessage.innerHTML = reason ? noEmailText : emptyReasonText;
|
noEmailMessage.innerHTML = reason ? noEmailText : emptyReasonText;
|
||||||
|
console.log(`reaso: ${reason} vs in ${reason in actionNeededEmailsJson}`)
|
||||||
|
console.log(noEmailMessage)
|
||||||
if (reason && reason in actionNeededEmailsJson) {
|
if (reason && reason in actionNeededEmailsJson) {
|
||||||
let emailData = actionNeededEmailsJson[reason];
|
let emailBody = actionNeededEmailsJson[reason];
|
||||||
let emailBody = emailData.email_body_text
|
|
||||||
if (emailBody) {
|
if (emailBody) {
|
||||||
// Show the email
|
// Show the email
|
||||||
actionNeededEmail.value = emailBody
|
actionNeededEmail.value = emailBody
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue