Skip to content

Commit 180a7f7

Browse files
authored
1 parent bac8db1 commit 180a7f7

6 files changed

Lines changed: 21 additions & 4 deletions

File tree

feature-libs/organization/administration/components/user/form/user-form.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<fieldset required="true" class="full-width" formArrayName="roles">
101101
<legend class="label-content required">
102102
{{ 'orgUser.roles' | cxTranslate }}
103+
<cx-form-required-asterisks *cxFeature="'showRequiredAsterisks'" />
103104
</legend>
104105

105106
<label
@@ -123,6 +124,7 @@
123124
<fieldset required="true" class="full-width">
124125
<legend class="label-content required">
125126
{{ 'orgUser.rights' | cxTranslate }}
127+
<cx-form-required-asterisks *cxFeature="'showRequiredAsterisks'" />
126128
</legend>
127129

128130
<label

feature-libs/organization/administration/components/user/form/user-form.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
B2BUser,
2424
B2BUserRight,
2525
B2BUserRole,
26+
FeatureDirective,
2627
Title,
2728
TranslatePipe,
2829
} from '@spartacus/core';
@@ -72,6 +73,7 @@ import { UserItemService } from '../services/user-item.service';
7273
NgFor,
7374
AsyncPipe,
7475
TranslatePipe,
76+
FeatureDirective,
7577
],
7678
})
7779
export class UserFormComponent implements OnInit {

feature-libs/user/profile/components/update-profile/update-profile.component.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@
7979
</label>
8080

8181
<label>
82-
<span class="label-content">{{
83-
'updateProfileForm.customerId' | cxTranslate
84-
}}</span>
82+
<span class="label-content"
83+
>{{ 'updateProfileForm.customerId' | cxTranslate }}
84+
<cx-form-required-asterisks *cxFeature="'showRequiredAsterisks'" />
85+
</span>
8586
<input
8687
required="true"
8788
type="text"

feature-libs/user/profile/components/update-profile/update-profile.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ import {
1717
UntypedFormGroup,
1818
} from '@angular/forms';
1919
import { NgOptionComponent, NgSelectComponent } from '@ng-select/ng-select';
20-
import { RoutingService, TranslatePipe } from '@spartacus/core';
20+
import {
21+
FeatureDirective,
22+
RoutingService,
23+
TranslatePipe,
24+
} from '@spartacus/core';
2125
import {
2226
FormErrorsComponent,
2327
FormRequiredAsterisksComponent,
@@ -48,6 +52,7 @@ import { UpdateProfileComponentService } from './update-profile-component.servic
4852
FormErrorsComponent,
4953
AsyncPipe,
5054
TranslatePipe,
55+
FeatureDirective,
5156
],
5257
})
5358
export class UpdateProfileComponent {

projects/core/src/features-config/feature-toggles/config/feature-toggles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,11 @@ export interface FeatureTogglesInterface {
464464
* Requires the corresponding OCC endpoint to be available on the backend (from 2211.28 version).
465465
*/
466466
enableRemoveVoucherEndpoint?: boolean;
467+
468+
/**
469+
* When enabled, displays required field asterisks for form fields.
470+
*/
471+
showRequiredAsterisks?: boolean;
467472
}
468473

469474
export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
@@ -519,4 +524,5 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
519524
a11yVocalizeDropdownItemCount: false,
520525
useEnhancedSecurePasswordValidators: false,
521526
enableRemoveVoucherEndpoint: false,
527+
showRequiredAsterisks: false,
522528
};

projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ if (environment.cpq) {
348348
a11yVocalizeDropdownItemCount: true,
349349
useEnhancedSecurePasswordValidators: true,
350350
enableRemoveVoucherEndpoint: true,
351+
showRequiredAsterisks: true,
351352
};
352353
return appFeatureToggles;
353354
}),

0 commit comments

Comments
 (0)