OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
31 stars 121 forks source link

v92 latest: Fixes for the CDR edit-fk-component and the corresponding formfield status. #116

Closed juancarloscamargo closed 7 months ago

juancarloscamargo commented 7 months ago

The CDR edit-fk-component does not follow the enabled/disabled status of the corresponding formfield. Hence, if you disable a FK form element, the "Select" button of the component still appears, letting the user pickup an element from the fk list anyway.

Fix: edit-fk.component.html -- 53: ngIf="columnContainer?.canEdit && (isHierarchical || columnContainer?.fkRelations?.length > 1)" ++ 53: ngIf="columnContainer?.canEdit && (isHierarchical || columnContainer?.fkRelations?.length > 1) && !control.disabled"

hth!

hannoquest commented 7 months ago

Hi @juancarloscamargo ,

Disabled CDR fields are not supported at this time.

This is because the model for IEntityColumn (and its counterpart interface in .NET) have never supported a disabled state. They do however, support a read-only state which is what we are using.

juancarloscamargo commented 7 months ago

Hi, @hannoquest In our case, we need to disable the UID_Department field if the identity is marked as external. The only way we've found is this in the identity edit/create forms (quick example):

case 'IsExternal': if (this.identityForm.controls.IsExternal.value == 1) { this.data.selectedIdentity.GetEntity().GetColumn('UID_Department').PutValue(''); this.identityForm.controls['UID_Department'].disable(); }

without the fix: image

The field is disabled but the select (seleccionar) button is active, allowing the user to pick an element.

Mathnstein commented 7 months ago

While we see this as a simple change, the disabling of cdr fields is not currently supported and we consider this a feature enhancement.

Still thanks for the feedback @juancarloscamargo