landmark-serve
Version:
Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose
17 lines (16 loc) • 909 B
text/jade
.field.type-name(data-field-type=field.type, data-field-path=field.path, data-field-collapse=field.collapse ? 'true' : false, data-field-depends-on=field.dependsOn, data-field-noedit=field.noedit ? 'true' : 'false')
label.field-label= field.label
.field-ui
if field.noedit
- var value = field.format(item)
if item.get(field.paths.first) || item.get(field.paths.last)
.field-value= item.get(field.paths.first)
.field-value= item.get(field.paths.last)
else
.field-value
else
.form-row
.col-sm-6: input(type='text', name=field.paths.first, autocomplete='off', placeholder='first name', value=item.get(field.paths.first)).form-control
.col-sm-6: input(type='text', name=field.paths.last, autocomplete='off', placeholder='last name', value=item.get(field.paths.last)).form-control
if field.note
.col-sm-9.col-md-10.col-sm-offset-3.col-md-offset-2: .field-note!= field.note