6 [%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
8 [%- IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %]
9 <input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
11 [%- ELSIF !var.valid %]
12 [%- IF show_disabled_message %]
13 <i>[% 'Element disabled' | $T8 %]</i>
16 [%- ELSIF var.type == 'bool' %]
17 <input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
19 [%- ELSIF var.type == 'textfield' %]
20 <textarea name="[% var_name %]" cols="[% HTML.escape(var.width) %]" rows="[% HTML.escape(var.height) %]">[% HTML.escape(var.value) %]</textarea>
22 [%- ELSIF var.type == 'date' %]
23 [% L.date_tag(var_name, var.value) %]
25 [%- ELSIF var.type == 'timestamp' %]
26 <input name="[% var_name %]" value="[% HTML.escape(var.value) %]">
28 [%- ELSIF var.type == 'customer' %]
29 [% P.customer_vendor.picker(var_name, var.value, type='customer') %]
31 [%- ELSIF var.type == 'vendor' %]
32 [% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
34 [%- ELSIF var.type == 'part' %]
35 [% P.part.picker(var_name, var.value) %]
37 [%- ELSIF var.type == 'select' %]
39 <select name="[% var_name %]">
40 [%- FOREACH option = var.OPTIONS %]
41 <option value="[% option.value | html %]"[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
46 <input name="[% var_name %]" value="[% HTML.escape(var.value) %]" [%- IF var.maxlength %] maxlength="[% HTML.escape(var.maxlength) %]"[% END -%]>