Skip to content

Commit

Permalink
Show/hide field form options for text fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed Dec 10, 2024
1 parent 0c3fe08 commit 8539528
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,38 @@ <h1 class="title">Fields</h1>
<div class="field">
<label class="label" for="options">Options</label>
<ng-container formGroupName="options">
<div class="control">
<div *ngIf="field.get('type').value === 'text_content' || field.get('type').value === 'text_metadata' " class="control">
<label class="checkbox">
<input type="checkbox" name="search" formControlName="search" /> Search
<p class="help">Enable full-text search for this field.</p>
</label>
</div>
<div *ngIf="field.get('type').value !== 'text_content' " class="control">
<label class="checkbox">
</label>
</div>
<div *ngIf="field.get('type').value !== 'text_content' " class="control">
<label class="checkbox">
<input type="checkbox" name="filter" formControlName="filter" /> Filter
<p class="help">Enable filtering on values in this field.</p>
</label>
</div>
<div class="control">
<label class="checkbox">
</label>
</div>
<div class="control">
<label class="checkbox">
<input type="checkbox" name="preview" formControlName="preview" /> Preview
<p class="help">Show this field in the results overview.</p>
</label>
</div>
<div class="control">
<label class="checkbox">
</label>
</div>
<div *ngIf="field.get('type').value !== 'text_content' " class="control">
<label class="checkbox">
<input type="checkbox" name="sort" formControlName="sort" /> Sort
<p class="help">Enable sorting on values of this field.</p>
</label>
</div>
</ng-container>
</div>
<div *ngIf="getFieldProperty(field, 'hasLanguage')" class="field">
<div class="control">
<p-dropdown [options]="languageOptions" formControlName="language" optionLabel="name" optionValue="code"
placeholder="select language (optional)" [filter]="true" />
</div>
</div>
</label>
</div>
</ng-container>
</div>
<div *ngIf="getFieldProperty(field, 'hasLanguage')" class="field">
<div class="control">
<p-dropdown [options]="languageOptions" formControlName="language" optionLabel="name" optionValue="code"
placeholder="select language (optional)" [filter]="true" />
</div>
</div>

</div>
</ng-container>
Expand Down

0 comments on commit 8539528

Please sign in to comment.