From ffd3b73232db422c185dfe25b96c83bb93cb5b35 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Tue, 28 Mar 2017 23:16:31 +0800 Subject: [PATCH] fix related issues --- .../account-settings-modal.component.ts | 12 ++++ .../password/forgot-password.component.html | 2 +- .../password/forgot-password.component.ts | 7 ++- .../password/password-setting.component.ts | 13 +++- .../password/reset-password.component.html | 2 +- .../password/reset-password.component.ts | 14 ++++- .../app/account/sign-in/sign-in.component.ts | 3 +- .../app/account/sign-up/sign-up.component.ts | 7 ++- .../base/navigator/navigator.component.html | 2 +- .../app/base/navigator/navigator.component.ts | 6 ++ .../config/auth/config-auth.component.html | 4 +- .../app/config/auth/config-auth.component.ts | 21 ++++++- src/ui_ng/src/app/config/config.component.ts | 13 ++-- src/ui_ng/src/app/log/recent-log.component.ts | 3 +- .../new-user-form/new-user-form.component.ts | 40 ++++++++----- .../route/auth-user-activate.service.ts | 5 +- .../route/sign-in-guard-activate.service.ts | 2 +- .../src/app/user/new-user-modal.component.ts | 4 ++ src/ui_ng/src/app/user/user.component.html | 60 +++++++++---------- src/ui_ng/src/i18n/lang/en-lang.json | 3 +- src/ui_ng/src/i18n/lang/zh-lang.json | 3 +- 21 files changed, 155 insertions(+), 71 deletions(-) diff --git a/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.ts b/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.ts index 24834916c..4f3b33ff3 100644 --- a/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.ts +++ b/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.ts @@ -141,6 +141,18 @@ export class AccountSettingsModalComponent implements OnInit, AfterViewChecked { this.account = Object.assign({}, this.session.getCurrentUser()); this.formValueChanged = false; + //Confirm inline alert is closed + this.inlineAlert.close(); + + //Clear check history + this.mailAlreadyChecked = {}; + + //Reset validation status + this.validationStateMap = { + "account_settings_email": true, + "account_settings_full_name": true + }; + this.opened = true; } diff --git a/src/ui_ng/src/app/account/password/forgot-password.component.html b/src/ui_ng/src/app/account/password/forgot-password.component.html index 70cbf4042..b805a73f4 100644 --- a/src/ui_ng/src/app/account/password/forgot-password.component.html +++ b/src/ui_ng/src/app/account/password/forgot-password.component.html @@ -1,4 +1,4 @@ - + diff --git a/src/ui_ng/src/app/account/password/forgot-password.component.ts b/src/ui_ng/src/app/account/password/forgot-password.component.ts index ab0a996ef..f8ed863e1 100644 --- a/src/ui_ng/src/app/account/password/forgot-password.component.ts +++ b/src/ui_ng/src/app/account/password/forgot-password.component.ts @@ -32,10 +32,15 @@ export class ForgotPasswordComponent { } public open(): void { - this.opened = true; + //Clear state data this.validationState = true; this.forceValid = true; + this.onGoing = false; + this.email = ""; this.forgotPwdForm.resetForm(); + this.inlineAlert.close(); + + this.opened = true; } public close(): void { diff --git a/src/ui_ng/src/app/account/password/password-setting.component.ts b/src/ui_ng/src/app/account/password/password-setting.component.ts index 6b38a8e8c..38b3c191c 100644 --- a/src/ui_ng/src/app/account/password/password-setting.component.ts +++ b/src/ui_ng/src/app/account/password/password-setting.component.ts @@ -93,9 +93,18 @@ export class PasswordSettingComponent implements AfterViewChecked { //Open modal dialog open(): void { - this.opened = true; - this.pwdForm.reset(); + //Reset state this.formValueChanged = false; + this.onCalling = false; + this.error = null; + this.validationStateMap = { + "newPassword": true, + "reNewPassword": true + }; + this.pwdForm.reset(); + this.inlineAlert.close(); + + this.opened = true; } //Close the moal dialog diff --git a/src/ui_ng/src/app/account/password/reset-password.component.html b/src/ui_ng/src/app/account/password/reset-password.component.html index 499db9933..69cdc9ee5 100644 --- a/src/ui_ng/src/app/account/password/reset-password.component.html +++ b/src/ui_ng/src/app/account/password/reset-password.component.html @@ -1,4 +1,4 @@ - +