Files
zitadel/console/src/app/modules/string-list/string-list.component.html
T
Max PeintnerandGitHub c420de1533 fix(console): LDAP UI optimization for better required field recognition, improve onboarding all done visibility (#5659)
* fix: onboarding all done styles

* ldap UI change

* rm log

* set required marker to formfield, max width of string-list comp

* seperate formfields

* formarray

* clear action

* validator

* hide pwd field

* rm dead code

* lint
2023-04-18 17:37:26 +02:00

44 lines
1.7 KiB
HTML

<div class="form-array-list">
<div class="form-field-list">
<div class="list-header-wrapper">
<p class="list-header cnsl-secondary-text">{{ title }}*</p>
<button
class="add-element-btn"
matTooltip="{{ 'ACTIONS.ADD' | translate }}"
type="button"
mat-icon-button
(click)="addArrayEntry()"
>
<mat-icon>add</mat-icon>
</button>
</div>
<ng-container *ngFor="let formControl of formArray.controls; index as i">
<div class="element-row">
<cnsl-form-field class="formfield" [hideRequiredMarker]="true">
<input cnslInput title="{{ 'IDP.SERVERS' | translate }}" [formControl]="$any(formControl)" required />
</cnsl-form-field>
<button
class="add-element-btn"
[disabled]="i === 0 && formArray.controls.length === 1 && formControl.value === ''"
[matTooltip]="
i === 0 && formArray.controls.length === 1 ? ('ACTIONS.CLEAR' | translate) : ('ACTIONS.REMOVE' | translate)
"
type="button"
mat-icon-button
color="warn"
(click)="i === 0 && formArray.controls.length === 1 ? clearEntryAtIndex(i) : removeEntryAtIndex(i)"
>
<i *ngIf="i === 0 && formArray.controls.length === 1; else removeIcon" class="las la-times-circle"></i>
<ng-template #removeIcon>
<i class="las la-minus-circle"></i>
</ng-template>
</button>
</div>
</ng-container>
<span class="control-error" *ngIf="control.touched && control.errors && control.errors['errorsatleastone']">{{
control.errors['errorsatleastone'].i18nKey | translate
}}</span>
</div>
</div>