mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
🐛 Fixed Enter
key not working in send email confirmation modal
no issue - the modal wasn't overriding the default `confirm` action so an error was thrown and the confirm action not triggered when pressing <kbd>Enter</kbd> whilst the modal is shown - resolves Sentry error `ADMIN-M`
This commit is contained in:
parent
194cf296e5
commit
2f828137ab
@ -14,6 +14,18 @@ export default ModalComponent.extend({
|
||||
// Allowed actions
|
||||
confirm: () => {},
|
||||
|
||||
actions: {
|
||||
confirm() {
|
||||
if (this.errorMessage) {
|
||||
return this.retryEmailTask.perform();
|
||||
} else {
|
||||
if (!this.countPaidMembersTask.isRunning) {
|
||||
return this.confirmAndCheckErrorTask.perform();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
countPaidMembers: action(function () {
|
||||
// TODO: remove editor conditional once editors can query member counts
|
||||
if (['free', 'paid'].includes(this.model.sendEmailWhenPublished) && !this.session.get('user.isEditor')) {
|
||||
|
Loading…
Reference in New Issue
Block a user