$self->ut_numbern('svcnum')
|| $self->ut_text('acctnum')
|| $self->ut_numbern('installdate')
- || $self->ut_textn('note')
+ || $self->ut_anything('note')
;
return $error if $error;
|| $self->ut_alphan('serial')
|| $self->ut_alphan('smartcard')
|| $self->ut_foreign_keyn('statusnum', 'hardware_status', 'statusnum')
- || $self->ut_textn('note')
+ || $self->ut_anything('note')
;
return $error if $error;
: $fields->{$_}
);
} keys %$fields;
-my $model = { field => 'typenum',
- type => 'text',
- value => sub { $_[0]->hardware_type->model }
- };
+my $model = { field => 'typenum',
+ type => 'text',
+ value => sub { $_[0]->hardware_type->model }
+ };
my $status = { field => 'statusnum',
type => 'text',
value => sub { $_[0]->status_label }
- };
-my @fields = ($model, qw( serial hw_addr ip_addr smartcard ), $status, 'note' );
+ };
+my $note = { field => 'note',
+ type => 'text',
+ value => sub { encode_entities($_[0]->note) }
+ };
+my @fields = ($model, qw( serial hw_addr ip_addr smartcard ), $status, $note );
</%init>