/templates/default_input.tmpl
Type: /type/template
body: value: $def with (thing, property)

$ kind = property.expected_type.kind

$if kind == "primitive" or kind == "basic":
    $if property.get('options'):
        $ v = thing.value
        $if not v and property.name == 'kind':
            $ v = 'regular'
        $:Dropdown(property.name, property.options, value=v).render()
    $else:
        <input type="text" id="input_$property.name" name="$property.name" value="$thing.value" style="width: 100%"/>
$elif kind == 'embeddable':
    <table style="width: 100%;">
    $for p in property.expected_type.properties:
        <tr>
            <td class="formheader">$p.name</td>
            <td class="formfield">$:thinginput(thing[p.name], expected_type=p.expected_type, name=property.name + '.' + p.name)</td>
        </tr>
    </table>
$else:
    $:macros.ThingReference(thing.type, property.name, thing)
title: default_input template