summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark <mark>2011-07-31 01:00:52 +0000
committermark <mark>2011-07-31 01:00:52 +0000
commit8540e77a4e36da552b518c13200e07570182676b (patch)
tree03d56c5071c48ac936a51025861021d92243a9b6
parent007fd3026ade508a9d88b436575a4797d003280a (diff)
more tolerant installation note fields, #13827
-rw-r--r--FS/FS/svc_dish.pm2
-rw-r--r--FS/FS/svc_hardware.pm2
-rw-r--r--httemplate/edit/svc_dish.cgi4
-rw-r--r--httemplate/edit/svc_hardware.cgi4
-rw-r--r--httemplate/view/svc_dish.cgi4
-rw-r--r--httemplate/view/svc_hardware.cgi16
6 files changed, 19 insertions, 13 deletions
diff --git a/FS/FS/svc_dish.pm b/FS/FS/svc_dish.pm
index e254bf5..5c9e217 100644
--- a/FS/FS/svc_dish.pm
+++ b/FS/FS/svc_dish.pm
@@ -116,7 +116,7 @@ sub check {
$self->ut_numbern('svcnum')
|| $self->ut_text('acctnum')
|| $self->ut_numbern('installdate')
- || $self->ut_textn('note')
+ || $self->ut_anything('note')
;
return $error if $error;
diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm
index 8f037f7..4970b3e 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -170,7 +170,7 @@ sub check {
|| $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;
diff --git a/httemplate/edit/svc_dish.cgi b/httemplate/edit/svc_dish.cgi
index 57df498..f708464 100644
--- a/httemplate/edit/svc_dish.cgi
+++ b/httemplate/edit/svc_dish.cgi
@@ -28,8 +28,8 @@ my @fields = (
{
field => 'note',
type => 'textarea',
- rows => 4,
- cols => 30,
+ rows => 8,
+ cols => 50,
label => 'Installation notes',
},
diff --git a/httemplate/edit/svc_hardware.cgi b/httemplate/edit/svc_hardware.cgi
index cde7449..dcf83de 100644
--- a/httemplate/edit/svc_hardware.cgi
+++ b/httemplate/edit/svc_hardware.cgi
@@ -51,8 +51,8 @@ my @fields = (
{
field => 'note',
type => 'textarea',
- rows => 4,
- cols => 30,
+ rows => 8,
+ cols => 50,
label => 'Installation notes',
},
diff --git a/httemplate/view/svc_dish.cgi b/httemplate/view/svc_dish.cgi
index 768c137..58da707 100644
--- a/httemplate/view/svc_dish.cgi
+++ b/httemplate/view/svc_dish.cgi
@@ -14,6 +14,8 @@ my %labels = map { $_ => ( ref($fields->{$_})
} keys %$fields;
my @fields = ('acctnum',
{ field => 'installdate', type => 'date' },
- 'note'
+ { field => 'note',
+ value => sub { encode_entities($_[0]->note) }
+ },
);
</%init>
diff --git a/httemplate/view/svc_hardware.cgi b/httemplate/view/svc_hardware.cgi
index 8201e9d..d982bc8 100644
--- a/httemplate/view/svc_hardware.cgi
+++ b/httemplate/view/svc_hardware.cgi
@@ -12,13 +12,17 @@ my %labels = map { $_ => ( ref($fields->{$_})
: $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>