name: zab/quick-check
title: "Quick Check"
description: "Block Quick Check"
group: Content Elements
priority: -17
prefixFields: true
prefixType: full
fields:
  - identifier: Zab/GeneralRow
    type: Basic

  - identifier: tab_content
    type: Tab
    label: "Content"
  - identifier: opt_back
    type: Checkbox
    label: "Go Back Button"
    renderType: checkboxToggle
    default: 1
  - identifier: info
    type: Textarea
    label: "Info"
    enableRichtext: true
  - identifier: opt_has
    type: Checkbox
    label: "Has Questions"
    renderType: checkboxToggle
    default: 1
    onChange: reload

  - identifier: tab_questions
    type: Tab
    label: "Questions"
  - identifier: questions
    type: Collection
    label: "Questions"
    appearance:
      levelLinksPosition: bottom
    displayCond: "FIELD:zab_quickcheck_opt_has:=:1"
    fields:
      - identifier: title
        type: TextInput
        label: "Title"
      - identifier: subtitle
        type: TextInput
        label: "Subtitle"
      - identifier: link
        type: Select
        label: "Page"
        renderType: selectTree
        foreign_table: pages
        foreign_table_where: "ORDER BY pages.sorting ASC"
        minitems: 0
        maxitems: 1
        treeConfig:
          parentField: pid
          # startingPoints: '39' // This is defined in the backoffice 'Site Configuration'->'Global Settings'
          appearance:
            showHeader: false
            expandAll: true
            maxLevels: 12
