mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
909bd60db3
no issue - enter key when a modal is displayed will always trigger the `confirm` action, if it's not provided then the base modal will throw a `You must override the "confirm" action ...` error
20 lines
522 B
JavaScript
20 lines
522 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {reads} from '@ember/object/computed';
|
|
|
|
export default ModalComponent.extend({
|
|
'data-test-theme-warnings-modal': true,
|
|
|
|
title: reads('model.title'),
|
|
message: reads('model.message'),
|
|
warnings: reads('model.warnings'),
|
|
errors: reads('model.errors'),
|
|
fatalErrors: reads('model.fatalErrors'),
|
|
canActivate: reads('model.canActivate'),
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.send('closeModal');
|
|
}
|
|
}
|
|
});
|