Skip to content

Commit

Permalink
Exclude other reason for now
Browse files Browse the repository at this point in the history
  • Loading branch information
zandercymatics committed Oct 1, 2024
1 parent 162369f commit 0a7d4e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/registrar/assets/js/get-gov-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,11 @@ class CustomizableEmailBase {
return this.lastSentEmailContent.value.replace(/\s+/g, '') === this.textarea.value.replace(/\s+/g, '');
}

updateUserInterface(reason=this.dropdown.value) {
updateUserInterface(reason=this.dropdown.value, excluded_reasons=["other"]) {
if (!reason) {
// No reason selected, we will set the label to "Email", show the "Make a selection" placeholder, hide the trigger, textarea, hide the help text
this.showPlaceholderNoReason();
} else if (reason === 'other') {
} else if (excluded_reasons.includes(reason)) {
// 'Other' selected, we will set the label to "Email", show the "No email will be sent" placeholder, hide the trigger, textarea, hide the help text
this.showPlaceholderOtherReason();
} else {
Expand Down Expand Up @@ -728,10 +728,13 @@ class customRejectedEmail extends CustomizableEmailBase {
this.showPlaceholder("Email:", "Select a rejection reason to see email");
}

// Overrides the placeholder text when the reason other is selected
showPlaceholderOtherReason() {
this.showPlaceholder("Email:", "No email will be sent");
updateUserInterface(reason=this.dropdown.value, excluded_reasons=[]) {
super.updateUserInterface(reason, excluded_reasons);
}
// Overrides the placeholder text when the reason other is selected
// showPlaceholderOtherReason() {
// this.showPlaceholder("Email:", "No email will be sent");
// }
}


Expand Down
2 changes: 1 addition & 1 deletion src/registrar/utility/admin_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_rejection_reason_default_email(domain_request, rejection_reason):
domain_request,
file_path="emails/status_change_rejected.txt",
reason=rejection_reason,
excluded_reasons=[DomainRequest.RejectionReasons.OTHER]
# excluded_reasons=[DomainRequest.RejectionReasons.OTHER]
)

def _get_default_email(domain_request, file_path, reason, excluded_reasons=None):
Expand Down

0 comments on commit 0a7d4e4

Please sign in to comment.