+%# include export selection
+<& export_svc.html,
+ part_svc => $part_svc,
+ svcdb => $svcdb
+&>
For the selected table, you can give fields default or fixed (unchangeable)
values, or select an inventory class to manually or automatically fill in
that field.
@@ -92,6 +77,7 @@ that field.
Field
Label
Modifier
+
Required?
% $part_svc->set('svcpart' => $opt{'clone'}) if $opt{'clone'}; # for now
% my $i = 0;
@@ -155,7 +141,8 @@ that field.
'value_col' => $def->{'select_key'},
'order_by' => dbdef->table($def->{'select_table'})->primary_key,
'multiple' => $def->{'multiple'},
- 'disable_empty' => 1,
+ 'disable_empty' => $def->{'select_allow_empty'} ? undef : 1,
+ 'empty_label' => $def->{'select_allow_empty'} ? ' ' : undef,
'curr_value' => $value,
# these can be switched between multiple and singular,
# so put the complete curr_value in an attribute
@@ -183,8 +170,8 @@ that field.
'curr_value' => $value,
&>
% }
-% } elsif ( $def->{'type'} =~ /select-(.*?).html/ ) {
- <& '/elements/'.$def->{'type'},
+% } elsif ( $def->{'type'} =~ /^select-(.*?)(.html)?$/ && $1 ne 'hardware' ) {
+ <& "/elements/select-$1.html",
'field' => $name,
'id' => $name.'_select',
'multiple' => $def->{'multiple'},
@@ -220,13 +207,21 @@ that field.
'name_col' => 'classname',
'curr_value' => $value,
'empty_label' => "Select $mode class",
- 'multiple' => 0,
+ 'multiple' => $multiple,
&>
% }
+