UNPKG

@aujsf/bootstrap-theme

Version:
35 lines (28 loc) 1.19 kB
<template> <require from="@aujsf/bootstrap-theme/aujsf-bs-label.html"></require> <div class="form-group"> <aujsf-bs-label id.bind="id" title.bind="title" required.bind="required" class="${!description ? 'mb-1' : 'mb-0'}"> </aujsf-bs-label> <small class="form-text text-muted mt-0 mb-1" if.bind="description">${description}</small> <span class="d-block invalid-feedback" if.bind="hasErrors" repeat.for="error of errorMessages"> ${error} </span> <template if.bind="schema.enum"> <let enum-labels.bind="uiSchema['ui:enum-labels'] || {}"></let> <div class="form-check" repeat.for="option of schema.enum"> <input id.bind="id + '__' + option" class="form-check-input" type="radio" disabled.bind="readonly" name.bind="id" model.bind="option" checked.bind="value"> <label for.bind="id + '__' + option" class="form-check-label small"> ${option === null ? (placeholder || 'unset') : (enumLabels[option] || option)} </label> </div> </template> </div> </template>