mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Give missing account warning during password reset
The reset password process will tell the user if they do not have an account.
This commit is contained in:
parent
2ddd7ada9b
commit
b5a5cfd697
4 changed files with 24 additions and 6 deletions
|
@ -18,6 +18,7 @@ import Component from '@ember/component';
|
|||
export default Component.extend({
|
||||
email: "",
|
||||
sayThanks: false,
|
||||
sayError: false,
|
||||
emailEmpty: empty('email'),
|
||||
hasEmptyEmailError: and('emailEmpty', 'emailIsEmpty'),
|
||||
|
||||
|
@ -30,10 +31,16 @@ export default Component.extend({
|
|||
return $("#email").focus();
|
||||
}
|
||||
|
||||
set(this, 'sayThanks', false);
|
||||
set(this, 'sayError', false);
|
||||
|
||||
set(this, 'emailIsEmpty', false);
|
||||
|
||||
this.get('forgot')(email).then(() => {
|
||||
set(this, 'sayThanks', true);
|
||||
set(this, 'email', '');
|
||||
set(this, 'emailIsEmpty', false);
|
||||
}).catch(() => {
|
||||
set(this, 'sayError', true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue