description template ui fixes
This commit is contained in:
parent
b27b85f876
commit
14c0598384
|
@ -31,13 +31,13 @@
|
|||
<input matInput [formControl]="form.get('data').get('options').get(''+i).get('value')" (change)="applyNewVisibilityValueListener()">
|
||||
<mat-error *ngIf="form.get('data').get('options').get(''+i).get('value').hasError('backendError')">{{form.get('data').get('options').get(''+i).get('value').getError('backendError').message}}</mat-error>
|
||||
</mat-form-field>
|
||||
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button" [disabled]="this.form.disabled">
|
||||
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button" [disabled]="this.form.disabled || viewOnly">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<mat-error *ngIf="form.get('data').get('options').hasError('backendError')">{{form.get('data').get('options').getError('backendError').message}}</mat-error>
|
||||
<div class="col-auto"><button mat-icon-button [disabled]="this.form.disabled" (click)="addNewRow()">
|
||||
<div class="col-auto"><button mat-icon-button [disabled]="this.form.disabled || viewOnly" (click)="addNewRow()">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button></div>
|
||||
</div>
|
|
@ -13,6 +13,7 @@ import { BaseComponent } from '@common/base/base.component';
|
|||
export class DescriptionTemplateEditorSelectFieldComponent extends BaseComponent implements OnInit {
|
||||
|
||||
@Input() form: UntypedFormGroup;
|
||||
@Input() viewOnly: boolean = false;
|
||||
@Input() validationErrorModel: ValidationErrorModel;
|
||||
@Input() validationRootPath: string;
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<div class="col-auto">
|
||||
<ul class="list-unstyled list-inline d-flex align-items-center">
|
||||
<li class="list-inline-item">
|
||||
<mat-slide-toggle class="field-toggler" [checked]="isRequired" (change)="toggleRequired($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled">
|
||||
<mat-slide-toggle class="field-toggler" [checked]="isRequired" (change)="toggleRequired($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled || viewOnly">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
|
||||
</mat-slide-toggle>
|
||||
</li>
|
||||
<li *ngIf="fieldType === descriptionTemplateFieldTypeEnum.FREE_TEXT" class="list-inline-item">
|
||||
<mat-slide-toggle class="field-toggler" [checked]="isURL" (change)="toggleURL($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled">
|
||||
<mat-slide-toggle class="field-toggler" [checked]="isURL" (change)="toggleURL($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled || viewOnly">
|
||||
{{'GENERAL.VALIDATION.URL.LABEL' | translate}}
|
||||
</mat-slide-toggle>
|
||||
</li>
|
||||
|
@ -161,7 +161,7 @@
|
|||
<div class="row" [ngSwitch]="form.get('data')?.get('fieldType')?.value">
|
||||
|
||||
<app-description-template-editor-reference-type-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.REFERENCE_TYPES" class="col-12" [form]="form" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath"></app-description-template-editor-reference-type-field-component>
|
||||
<app-description-template-editor-select-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.SELECT" class="col-12" [form]="form" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath"></app-description-template-editor-select-field-component>
|
||||
<app-description-template-editor-select-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.SELECT" class="col-12" [form]="form" [viewOnly]="viewOnly" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath"></app-description-template-editor-select-field-component>
|
||||
<app-description-template-editor-radio-box-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.RADIO_BOX" class="col-12" [form]="form" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath"></app-description-template-editor-radio-box-field-component>
|
||||
<app-description-template-editor-upload-field-component *ngSwitchCase="descriptionTemplateFieldTypeEnum.UPLOAD" class="col-12" [form]="form" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath"></app-description-template-editor-upload-field-component>
|
||||
|
||||
|
|
Loading…
Reference in New Issue