File tree Expand file tree Collapse file tree
organization/administration/components/user/form
user/profile/components/update-profile
core/src/features-config/feature-toggles/config
storefrontapp/src/app/spartacus Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff 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} )
7779export class UserFormComponent implements OnInit {
Original file line number Diff line number Diff line change 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 "
Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ import {
1717 UntypedFormGroup ,
1818} from '@angular/forms' ;
1919import { 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' ;
2125import {
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} )
5358export class UpdateProfileComponent {
Original file line number Diff line number Diff 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
469474export 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} ;
Original file line number Diff line number Diff 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 } ) ,
You can’t perform that action at this time.
0 commit comments