diff --git a/src/registrar/assets/js/get-gov-admin.js b/src/registrar/assets/js/get-gov-admin.js index cbf2cf351..f8d4d679d 100644 --- a/src/registrar/assets/js/get-gov-admin.js +++ b/src/registrar/assets/js/get-gov-admin.js @@ -644,9 +644,9 @@ class customActionNeededEmail extends CustomizableEmailBase { } loadActionNeededEmail() { - if (this.textAreaFormGroup && this.dropdownFormGroup) { - this.initializeFormGroups("action needed", "showActionNeededReason"); - } + // Hide/show the email fields depending on the current status + this.initializeFormGroups("action needed", "showActionNeededReason"); + // Setup the textarea, edit button, helper text this.updateUserInterface(this.dropdown.value); this.initializeDropdown("Error when attempting to grab action needed email: ") this.initializeModalConfirm() @@ -713,10 +713,7 @@ class customRejectedEmail extends CustomizableEmailBase { } loadRejectedEmail() { - if (this.textAreaFormGroup && this.dropdownFormGroup) { - // TODO: fix this for rejected - this.initializeFormGroups("rejected", "showRejectionReason"); - } + this.initializeFormGroups("rejected", "showRejectionReason"); this.updateUserInterface(this.dropdown.value); this.initializeDropdown("Error when attempting to grab rejected email: ") this.initializeModalConfirm() diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index 72e0e4773..3ccb490a9 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -693,8 +693,8 @@ class DomainRequest(TimeStampedModel): # We should never send an email if no reason was specified # Additionally, Don't send out emails for reasons that shouldn't send them - if new_reason is None or self.action_needed_reason in excluded_reasons: - return + if new_reason is None or new_reason in excluded_reasons: + return # Only send out an email if the underlying email itself changed if old_reason != new_reason: