2016-05-24 15:06:59 +03:00
|
|
|
import ModalComponent from 'ghost-admin/components/modals/base';
|
2016-04-27 00:32:17 +03:00
|
|
|
import {invokeAction} from 'ember-invoke-action';
|
2016-08-24 16:26:29 +03:00
|
|
|
import {alias} from 'ember-computed';
|
2015-11-18 13:50:48 +03:00
|
|
|
|
|
|
|
export default ModalComponent.extend({
|
|
|
|
|
|
|
|
submitting: false,
|
|
|
|
|
2016-08-24 16:26:29 +03:00
|
|
|
user: alias('model'),
|
2015-11-18 13:50:48 +03:00
|
|
|
|
|
|
|
actions: {
|
|
|
|
confirm() {
|
|
|
|
this.set('submitting', true);
|
|
|
|
|
2016-04-27 00:32:17 +03:00
|
|
|
invokeAction(this, 'confirm').finally(() => {
|
2015-11-18 13:50:48 +03:00
|
|
|
this.send('closeModal');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|