[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
[%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
[%- IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %]
[%- ELSIF !var.valid %]
[%- IF show_disabled_message %]
[% 'Element disabled' | $T8 %]
[%- END %]
[%- ELSIF var.type == 'bool' %]
[%- ELSIF var.type == 'textfield' %]
[%- ELSIF var.type == 'date' %]
[% L.date_tag(var_name, var.value) %]
[%- ELSIF var.type == 'timestamp' %]
[%- ELSIF var.type == 'customer' %]
[% L.customer_vendor_picker(var_name, var.value, type='customer') %]
[%- ELSIF var.type == 'vendor' %]
[% L.customer_vendor_picker(var_name, var.value, type='vendor') %]
[%- ELSIF var.type == 'part' %]
[% L.part_picker(var_name, var.value) %]
[%- ELSIF var.type == 'select' %]
[%- ELSE %]
[%- END %]