Merge branch 'f-use-proper-selects-and-pickers'
[kivitendo-erp.git] / templates / webpages / amcvar / render_inputs.html
index f4f1c63..a2f39ac 100644 (file)
@@ -4,7 +4,7 @@
 
 [%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
 
-[%- IF hide_non_editable && !var.flag_editable %]
+[%- IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %]
 <input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
 
 [%- ELSIF !var.valid %]
 <input name="[% var_name %]" value="[% HTML.escape(var.value) %]">
 
 [%- ELSIF var.type == 'customer' %]
-[% L.customer_picker(var_name, var.value) %]
+[% 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' %]
 
 <select name="[% var_name %]">
  [%- FOREACH option = var.OPTIONS %]
- <option[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
+ <option value="[% option.value | html %]"[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
  [%- END %]
 </select>