Skip to content

Commit 3b7871a

Browse files
author
Salim Terres
committed
Bug #15468 [Profile Groups] – The “Next” button becomes clickable before the name is validated.
1 parent 5aba3c5 commit 3b7871a

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

ui/ui-frontend/projects/identity/src/app/external-param-profile/external-param-profile-create/external-param-profile-create.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ export class ExternalParamProfileCreateComponent implements OnInit, OnDestroy {
138138
}
139139

140140
firstStepInvalid(): boolean {
141-
return this.externalParamProfileForm.get('name').invalid || this.externalParamProfileForm.get('description').invalid;
141+
const nameControl = this.externalParamProfileForm.get('name');
142+
const descriptionControl = this.externalParamProfileForm.get('description');
143+
144+
return nameControl.invalid || nameControl.pending || descriptionControl.invalid || descriptionControl.pending;
142145
}
143146

144147
formValid(): boolean {

ui/ui-frontend/projects/identity/src/app/group/group-create/group-create.component.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,23 @@ export class GroupCreateComponent implements OnInit, OnDestroy {
108108
}
109109

110110
firstStepInvalid(): boolean {
111-
return this.form.get('name').invalid || this.form.get('description').invalid || this.form.get('level').invalid;
111+
const nameControl = this.form.get('name');
112+
const descriptionControl = this.form.get('description');
113+
const levelControl = this.form.get('level');
114+
115+
return (
116+
nameControl.invalid ||
117+
nameControl.pending ||
118+
descriptionControl.invalid ||
119+
descriptionControl.pending ||
120+
levelControl.invalid ||
121+
levelControl.pending
122+
);
112123
}
113124

114125
secondStepInvalid(): boolean {
115-
return this.form.get('profileIds').invalid;
126+
const profileIdsControl = this.form.get('profileIds');
127+
return profileIdsControl.invalid || profileIdsControl.pending;
116128
}
117129

118130
formValid(): boolean {

0 commit comments

Comments
 (0)