mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 23:24:04 +08:00
22 lines
737 B
JavaScript
22 lines
737 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
import { resendActivationEmail } from 'discourse/lib/user-activation';
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
actions: {
|
|
sendActivationEmail() {
|
|
resendActivationEmail(this.get('username')).then(() => {
|
|
const modal = this.showModal('activation-resent', {title: 'log_in'});
|
|
modal.set('currentEmail', this.get('currentEmail'));
|
|
});
|
|
},
|
|
|
|
editActivationEmail() {
|
|
const modal = this.showModal('activation-edit', {title: 'login.change_email'});
|
|
|
|
const currentEmail = this.get('currentEmail');
|
|
modal.set('currentEmail', currentEmail);
|
|
modal.set('newEmail', currentEmail);
|
|
}
|
|
}
|
|
});
|