@osovitny/anatoly 2.14.46 → 2.14.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/ui/forms/contact-us/contact-us.mjs +13 -13
- package/fesm2015/osovitny-anatoly.mjs +12 -12
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +12 -12
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/ui/forms/contact-us/contact-us.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3503,7 +3503,9 @@ class ContactUsForm extends BaseEditComponent {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
ngOnInit() {
|
|
3505
3505
|
this.createFormGroup();
|
|
3506
|
-
this.
|
|
3506
|
+
this.appContext.getCurrent(context => {
|
|
3507
|
+
this.setContext(context);
|
|
3508
|
+
});
|
|
3507
3509
|
}
|
|
3508
3510
|
createFormGroup() {
|
|
3509
3511
|
this.formGroup = this.fb.group({
|
|
@@ -3515,17 +3517,15 @@ class ContactUsForm extends BaseEditComponent {
|
|
|
3515
3517
|
message: new FormControl('', [Validators.required])
|
|
3516
3518
|
});
|
|
3517
3519
|
}
|
|
3518
|
-
|
|
3519
|
-
this.
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
}
|
|
3528
|
-
}, false);
|
|
3520
|
+
setContext(context) {
|
|
3521
|
+
this.isUserSignedIn = context.isUserSignedIn;
|
|
3522
|
+
this.siteKey = context.reCaptchaSiteKey;
|
|
3523
|
+
this.selectedTopic = this.topicList[3].value;
|
|
3524
|
+
this.setFormValue('topic', this.selectedTopic);
|
|
3525
|
+
if (this.isUserSignedIn) {
|
|
3526
|
+
this.setFormValue('name', context.user.displayNameOrFullName);
|
|
3527
|
+
this.setFormValue('email', context.user.email);
|
|
3528
|
+
}
|
|
3529
3529
|
}
|
|
3530
3530
|
isValid() {
|
|
3531
3531
|
return this.formGroup.valid;
|