[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
[%- USE LxERP %]
[%- BLOCK cvar_name %][% HTML.escape(cvar.name_prefix) _ "cvar_" _ HTML.escape(cvar.var.name) _ HTML.escape(cvar.name_postfix) -%][% END %]
[%- BLOCK cvar_inputs %]
[% render_input_blocks__cvar_name = PROCESS cvar_name %]
[%- %]
[%- IF cvar.hide_non_editable && !cvar.var.flag_editable %]
[%- ELSIF !cvar.valid %]
[%- IF show_disabled_message %]
[% 'Element disabled' | $T8 %]
[%- END %]
[%- ELSIF cvar.var.type == 'bool' %]
[%- ELSIF cvar.var.type == 'textfield' %]
[% L.textarea_tag(render_input_blocks__cvar_name, cvar.value, cols=cvar.var.width, rows=cvar.var.height) %]
[%- ELSIF cvar.var.type == 'date' %]
[%- L.date_tag(render_input_blocks__cvar_name, cvar.value) %]
[%- ELSIF cvar.var.type == 'timestamp' %]
[%- ELSIF cvar.var.type == 'select' %]
[%- ELSIF cvar.var.type == 'customer' %]
[%- L.customer_picker(render_input_blocks__cvar_name, cvar.value) %]
[%- ELSIF cvar.var.type == 'vendor' %]
[% L.vendor_selector(render_input_blocks__cvar_name, cvar.value) %]
[%- ELSIF cvar.var.type == 'part' %]
[% L.part_selector(render_input_blocks__cvar_name, cvar.value) %]
[%- ELSIF cvar.var.type == 'number' %]
[%- L.input_tag(render_input_blocks__cvar_name, LxERP.format_amount(cvar.value, -2)) %]
[%- ELSE %]
[%- END %]
[%- END %]