File

core/dynamic-forms/checkbox/checkbox.type.component.ts

Extends

FieldType

Metadata

Index

Properties

Properties

Static Readonly CONFIG
Type : ConfigOption
Default value : { types: [ { name: 'checkbox', component: FieldCheckbox }, { name: 'boolean', extends: 'checkbox' }, { name: 'switch', extends: 'checkbox', defaultOptions: { templateOptions: { switchMode: true, indeterminate: false, } }, } ] }
defaultOptions
Type : object
Default value : { templateOptions: { indeterminate: true, formCheck: 'custom' // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel' } }
  <label
    [class.c8y-checkbox]="!to.switchMode"
    [class.c8y-switch]="to.switchMode"
    [class.has-error]="showError">
    <input
      type="checkbox"
      [class.is-invalid]="showError"
      [class.form-check-input]="to.formCheck.indexOf('custom') === -1"
      [class.position-static]="to.formCheck === 'nolabel'"
      [class.custom-control-input]="to.formCheck.indexOf('custom') === 0"
      [indeterminate]="to.indeterminate && formControl.value == null"
      [formControl]="formControl"
      [formlyAttributes]="field"
    /><span></span><span> {{ to.label | humanize}} </span>
    <span *ngIf="to.required && to.hideRequiredMarker !== true"><em class="m-l-4" translate>(required)</em></span>
    <button
      *ngIf="!!to.description"
      class="btn-clean m-l-4 flex-item-middle"
      [popover]="to.description"
      placement="auto"
      outsideClick="true"
      type="button"
    >
      <i c8yIcon="question-circle-o" class="text-primary"></i>
  </button>
  </label>

results matching ""

    No results matching ""