mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 00:12:16 +02:00
Exclude other reason for now
This commit is contained in:
parent
162369f5db
commit
0a7d4e460d
2 changed files with 9 additions and 6 deletions
|
@ -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 {
|
||||
|
@ -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");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue