xmpp.chapril.org-conversejs/src/templates/form_input.html
JC Brand 8a4aa4efdd Use a named variable for _.template
This removes the need for `switch (obj)` in the template which is not
allowed in strict mode.

Additionally using a named variable speeds up rendering.
2017-11-05 18:59:29 +01:00

8 lines
282 B
HTML

<label>
{{{o.label}}}
<input name="{{{o.name}}}" type="{{{o.type}}}"
{[ if (o.placeholder) { ]} placeholder="{{{o.placeholder}}}" {[ } ]}
{[ if (o.value) { ]} value="{{{o.value}}}" {[ } ]}
{[ if (o.required) { ]} class="required" {[ } ]} >
</label>