<!-- Render (no edit). -->
<ion-item *ngIf="!edit && field && field.name">
    <ion-label>
        <p class="item-heading">
            <core-format-text [text]="field.name" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"
                [courseId]="courseId" [wsNotFiltered]="true">
            </core-format-text>
        </p>
        <p *ngIf="value != '0'">
            {{ 'core.yes' | translate }}
        </p>
        <p *ngIf="value == '0'">
            {{ 'core.no' | translate }}
        </p>
    </ion-label>
</ion-item>

<!-- Edit. -->
<ion-item *ngIf="edit && field && field.shortname && form" [formGroup]="form">
    <ion-label>
        <span class="label-text" [core-mark-required]="required">
            <core-format-text [text]="field.name" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"
                [courseId]="courseId" [wsNotFiltered]="true">
            </core-format-text>
        </span>
        <core-input-errors [control]="form.controls[modelName]"></core-input-errors>
    </ion-label>
    <ion-checkbox item-end [formControlName]="modelName">
    </ion-checkbox>
</ion-item>
