aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-profile
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-profile')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html6
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts6
2 files changed, 7 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html
index 306f3a12c..bbdce5b02 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html
@@ -2,7 +2,7 @@
2 2
3<form role="form" (ngSubmit)="updateMyProfile()" [formGroup]="form"> 3<form role="form" (ngSubmit)="updateMyProfile()" [formGroup]="form">
4 4
5 <label for="display-name">Display name</label> 5 <label i18n for="display-name">Display name</label>
6 <input 6 <input
7 type="text" id="display-name" 7 type="text" id="display-name"
8 formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }" 8 formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
@@ -11,7 +11,7 @@
11 {{ formErrors['display-name'] }} 11 {{ formErrors['display-name'] }}
12 </div> 12 </div>
13 13
14 <label for="description">Description</label> 14 <label i18n for="description">Description</label>
15 <textarea 15 <textarea
16 id="description" formControlName="description" 16 id="description" formControlName="description"
17 [ngClass]="{ 'input-error': formErrors['description'] }" 17 [ngClass]="{ 'input-error': formErrors['description'] }"
@@ -20,5 +20,5 @@
20 {{ formErrors.description }} 20 {{ formErrors.description }}
21 </div> 21 </div>
22 22
23 <input type="submit" value="Update my profile" [disabled]="!form.valid"> 23 <input type="submit" i18n-value value="Update my profile" [disabled]="!form.valid">
24</form> 24</form>
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 468be022c..35843ecd9 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
@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4import { FormReactive, USER_DESCRIPTION, USER_DISPLAY_NAME, UserService } from '../../../shared' 4import { FormReactive, USER_DESCRIPTION, USER_DISPLAY_NAME, UserService } from '../../../shared'
5import { User } from '@app/shared' 5import { User } from '@app/shared'
6import { I18n } from '@ngx-translate/i18n-polyfill'
6 7
7@Component({ 8@Component({
8 selector: 'my-account-profile', 9 selector: 'my-account-profile',
@@ -27,7 +28,8 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
27 constructor ( 28 constructor (
28 private formBuilder: FormBuilder, 29 private formBuilder: FormBuilder,
29 private notificationsService: NotificationsService, 30 private notificationsService: NotificationsService,
30 private userService: UserService 31 private userService: UserService,
32 private i18n: I18n
31 ) { 33 ) {
32 super() 34 super()
33 } 35 }
@@ -56,7 +58,7 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
56 this.user.account.displayName = displayName 58 this.user.account.displayName = displayName
57 this.user.account.description = description 59 this.user.account.description = description
58 60
59 this.notificationsService.success('Success', 'Profile updated.') 61 this.notificationsService.success(this.i18n('Success'), this.i18n('Profile updated.'))
60 }, 62 },
61 63
62 err => this.error = err.message 64 err => this.error = err.message