7 [%- DEFAULT var_name = HTML.escape(cvar_name_prefix) _ HTML.escape(var.config.name) _ HTML.escape(cvar_name_postfix) %]
9 [%- IF ( hide_non_editable && !var.config.is_flag('editable') ) %]
10 [% L.hidden_tag(var_name, var.value) %]
11 [%- ELSIF ( !var.is_valid ) %]
12 [%- IF ( show_disabled_message ) %]
13 [% 'Element disabled' | $T8 %]
15 [%- ELSIF ( var.config .type == 'bool' ) %]
16 [% L.checkbox_tag(var_name, checked = var.value, for_submit = 1) %]
17 [%- ELSIF ( var.config .type == 'textfield' ) %]
18 [% L.textarea_tag(var_name, var.value, cols = var.config.processed_options.WIDTH, rows = var.config.processed_options.HEIGHT) %]
19 [%- ELSIF ( var.config.type == 'date' ) %]
20 [% L.date_tag(var_name, var.value) %]
21 [%- ELSIF ( var.config.type == 'timestamp' ) %]
22 [% L.input_tag(var_name, var.value) %]
23 [%- ELSIF ( var.config.type == 'customer' ) %]
24 [% P.customer_vendor.picker(var_name, var.value, type='customer') %]
25 [%- ELSIF ( var.config.type == 'vendor' ) %]
26 [% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
27 [%- ELSIF ( var.config.type == 'part' ) %]
28 [% P.part.picker(var_name, var.value) %]
29 [%- ELSIF ( var.config.type == 'select' ) %]
30 [% L.select_tag(var_name, var.config.processed_options, default = var.value) %]
31 [%- ELSIF ( var.config.type == 'number' ) %]
32 [%- L.input_tag(var_name, LxERP.format_amount(var.value, -2)) %]
34 [% L.input_tag(var_name, var.value, maxlength = var.config.processed_options.MAXLENGTH) %]