FIX: modal explaining that your account hasn't been activated yet was broken if you saw it more than once

This commit is contained in:
Neil Lalonde 2015-06-22 15:36:42 -04:00
parent 7ed309666b
commit 7ae1ff439d
2 changed files with 6 additions and 1 deletions

View File

@ -69,8 +69,9 @@ export default DiscourseController.extend(ModalFunctionality, {
sentTo: result.sent_to_email,
currentEmail: result.current_email
});
} else {
self.flash(result.error, 'error');
}
self.flash(result.error, 'error');
} else {
self.set('loggedIn', true);
// Trigger the browser's password manager using the hidden static login form:

View File

@ -4,6 +4,10 @@ import DiscourseController from 'discourse/controllers/controller';
export default DiscourseController.extend(ModalFunctionality, {
emailSent: false,
onShow() {
this.set("emailSent", false);
},
actions: {
sendActivationEmail: function() {
Discourse.ajax('/users/action/send_activation_email', {data: {username: this.get('username')}, type: 'POST'});