!.
+% ( $def->{'label'} || $field ).
+% " | ";
+%
+% $html .= qq! | ';
+%
+% $flag = '' if $def->{type} eq 'disabled';
+%
+% $html .= qq!!;
+%
+% if ( $def->{type} eq 'disabled' ) {
+%
+% $html .= 'No default';
+%
+% } else {
+%
+% $html .= qq!';
+%
+% $html .= join("\n",
+% '',
+% );
+%
+% }
+%
+% $html .= qq! | !;
+%
+% my $disabled = $flag ? ''
+% : 'DISABLED STYLE="background-color: #dddddd"';
+% my $nodisplay = ' STYLE="display:none"';
+%
+% if ( !$def->{type} || $def->{type} eq 'text' ) {
+%
+% my $is_inv = ( $flag =~ /^[MA]$/ );
+%
+% $html .=
+% qq!';
+%
+% $html .= include('/elements/select-table.html',
+% 'element_name' => "${layer}__${field}_classnum",
+% 'element_etc' => ( $is_inv
+% ? $disabled
+% : $nodisplay
+% ),
+% 'table' => 'inventory_class',
+% 'name_col' => 'classname',
+% 'value' => $value,
+% 'empty_label' => 'Select inventory class',
+% );
+%
+% } elsif ( $def->{type} eq 'checkbox' ) {
+%
+% $html .= include('/elements/checkbox.html',
+% 'field' => $layer.'__'.$field,
+% 'curr_value' => $value,
+% 'value' => 'Y',
+% );
+%
+% } elsif ( $def->{type} eq 'select' ) {
+%
+% $html .= qq!';
+%
+% } elsif ( $def->{type} eq 'textarea' ) {
+%
+% $html .=
+% qq!';
+%
+% } elsif ( $def->{type} =~ /select-(.*?).html/ ) {
+%
+% $html .= include("/elements/".$def->{type},
+% 'curr_value' => $value,
+% 'element_name' => "${layer}__${field}",
+% 'element_etc' => $disabled,
+% 'multiple' => ($def->{multiple} ||
+% $flag eq 'S'),
+% # allow the table def to force 'multiple'
+% );
+%
+% } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
+%
+% $html .= include('/elements/communigate_pro-accessmodes.html',
+% 'element_name_prefix' => "${layer}__${field}_",
+% 'curr_value' => $value,
+% #doesn't work#'element_etc' => $disabled,
+% );
+%
+% } elsif ( $def->{type} eq 'select-hardware' ) {
+%
+% $html .= qq!!;
+% $html .= include('/elements/select-hardware_class.html',
+% 'curr_value' => $value,
+% 'element_name' => "${layer}__${field}_classnum",
+% 'element_etc' => $flag ne 'H' && $nodisplay,
+% 'empty_label' => 'Select hardware class',
+% );
+%
+% } elsif ( $def->{type} eq 'disabled' ) {
+%
+% $html .=
+% qq!!;
+%
+% } else {
+%
+% $html .= 'unknown type '. $def->{type};
+%
+% }
+%
+% $html .= " |
\n";
+
+% $def_info = "($def_info)" if $def_info;
+% $html .=
+% qq!