Fixes #343
This commit is contained in:
@@ -23,6 +23,10 @@ import {
|
|||||||
|
|
||||||
const ELEMENT_ID_IMPORT_PASSWORD_INPUT = 'import-password-request';
|
const ELEMENT_ID_IMPORT_PASSWORD_INPUT = 'import-password-request';
|
||||||
|
|
||||||
|
const ELEMENT_NAME_AUTH_EMAIL = 'email';
|
||||||
|
const ELEMENT_NAME_AUTH_PASSWORD = 'password';
|
||||||
|
const ELEMENT_NAME_AUTH_PASSWORD_CONF = 'password_conf';
|
||||||
|
|
||||||
class AccountMenuCtrl extends PureCtrl {
|
class AccountMenuCtrl extends PureCtrl {
|
||||||
/* @ngInject */
|
/* @ngInject */
|
||||||
constructor(
|
constructor(
|
||||||
@@ -104,10 +108,25 @@ class AccountMenuCtrl extends PureCtrl {
|
|||||||
this.login(params);
|
this.login(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blurAuthFields() {
|
||||||
|
const names = [
|
||||||
|
ELEMENT_NAME_AUTH_EMAIL,
|
||||||
|
ELEMENT_NAME_AUTH_PASSWORD,
|
||||||
|
ELEMENT_NAME_AUTH_PASSWORD_CONF
|
||||||
|
];
|
||||||
|
for(const name of names) {
|
||||||
|
const element = document.getElementsByName(name)[0];
|
||||||
|
if(element) {
|
||||||
|
element.blur();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
submitAuthForm() {
|
submitAuthForm() {
|
||||||
if (!this.state.formData.email || !this.state.formData.user_password) {
|
if (!this.state.formData.email || !this.state.formData.user_password) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.blurAuthFields();
|
||||||
if (this.state.formData.showLogin) {
|
if (this.state.formData.showLogin) {
|
||||||
this.login();
|
this.login();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
type='password'
|
type='password'
|
||||||
)
|
)
|
||||||
input.sk-input.contrast(
|
input.sk-input.contrast(
|
||||||
name='password',
|
name='password_conf',
|
||||||
ng-if='self.state.formData.showRegister',
|
ng-if='self.state.formData.showRegister',
|
||||||
ng-model='self.state.formData.password_conf',
|
ng-model='self.state.formData.password_conf',
|
||||||
placeholder='Confirm Password',
|
placeholder='Confirm Password',
|
||||||
|
|||||||
2
dist/javascripts/app.js
vendored
2
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user