@chatterton/angular2-schema-form
Version:
Angular2 Schema Form (DISCLAIMER: it is not related to angular-schema-form)
45 lines (41 loc) • 1.42 kB
HTML
<div class="widget form-group">
<label [attr.for]="id" class="horizontal control-label">
{{ schema.title }}
</label>
<input
class="text-widget.id textline-widget form-control"
[]="schema.required"
[]="name"
[]="schema.widget.id !== 'color' && schema.readOnly ? true : null"
[]="this.getInputType()"
[]="id"
[]="control"
[]="schema.placeholder"
[]="schema.widget.id === 'color' && schema.readOnly ? true : null"
*ngIf="schema.widget.id !== 'auto-complete'"
>
<input
class="text-widget.id textline-widget form-control"
[]="schema.required"
[]="name"
[]="this.getInputType()"
[]="id"
[]="control"
[]="schema.placeholder"
*ngIf="schema.widget.id === 'auto-complete'"
auto-complete
[]="schema.source"
[]="schema.valueFormatter"
[]="schema.listFormatter"
>
<input
type="hidden"
*ngIf="schema.widget.id === 'color' && schema.readOnly"
[]="name"
[]="control"
>
<span
class="formHelp"
*ngIf="schema.help"
>{{schema.help}}</span>
</div>