mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 13:09:41 +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, '');
|
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) {
|
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
|
// 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();
|
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
|
// '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();
|
this.showPlaceholderOtherReason();
|
||||||
} else {
|
} else {
|
||||||
|
@ -728,10 +728,13 @@ class customRejectedEmail extends CustomizableEmailBase {
|
||||||
this.showPlaceholder("Email:", "Select a rejection reason to see email");
|
this.showPlaceholder("Email:", "Select a rejection reason to see email");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overrides the placeholder text when the reason other is selected
|
updateUserInterface(reason=this.dropdown.value, excluded_reasons=[]) {
|
||||||
showPlaceholderOtherReason() {
|
super.updateUserInterface(reason, excluded_reasons);
|
||||||
this.showPlaceholder("Email:", "No email will be sent");
|
|
||||||
}
|
}
|
||||||
|
// 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,
|
domain_request,
|
||||||
file_path="emails/status_change_rejected.txt",
|
file_path="emails/status_change_rejected.txt",
|
||||||
reason=rejection_reason,
|
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):
|
def _get_default_email(domain_request, file_path, reason, excluded_reasons=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue