diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts index 000a2c0ac..957abe555 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts | |||
@@ -25,18 +25,25 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit { | |||
25 | 25 | ||
26 | ngOnInit () { | 26 | ngOnInit () { |
27 | this.buildForm({ | 27 | this.buildForm({ |
28 | 'user-name': null, | ||
28 | 'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR, | 29 | 'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR, |
29 | description: USER_DESCRIPTION_VALIDATOR | 30 | description: USER_DESCRIPTION_VALIDATOR |
30 | }) | 31 | }) |
32 | this.form.controls['user-name'].disable() | ||
31 | 33 | ||
32 | this.userInformationLoaded.subscribe(() => { | 34 | this.userInformationLoaded.subscribe(() => { |
33 | this.form.patchValue({ | 35 | this.form.patchValue({ |
36 | 'user-name': this.user.username, | ||
34 | 'display-name': this.user.account.displayName, | 37 | 'display-name': this.user.account.displayName, |
35 | description: this.user.account.description | 38 | description: this.user.account.description |
36 | }) | 39 | }) |
37 | }) | 40 | }) |
38 | } | 41 | } |
39 | 42 | ||
43 | get instanceHost () { | ||
44 | return window.location.host | ||
45 | } | ||
46 | |||
40 | updateMyProfile () { | 47 | updateMyProfile () { |
41 | const displayName = this.form.value['display-name'] | 48 | const displayName = this.form.value['display-name'] |
42 | const description = this.form.value['description'] || null | 49 | const description = this.form.value['description'] || null |