more tolerant installation note fields, #13827
authormark <mark>
Sun, 31 Jul 2011 01:01:05 +0000 (01:01 +0000)
committermark <mark>
Sun, 31 Jul 2011 01:01:05 +0000 (01:01 +0000)
FS/FS/svc_dish.pm
FS/FS/svc_hardware.pm
httemplate/edit/svc_dish.cgi
httemplate/edit/svc_hardware.cgi
httemplate/view/svc_dish.cgi
httemplate/view/svc_hardware.cgi

index e254bf5..5c9e217 100644 (file)
@@ -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;
 
index 8f037f7..4970b3e 100644 (file)
@@ -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;
 
index 57df498..f708464 100644 (file)
@@ -28,8 +28,8 @@ my @fields = (
   {
     field => 'note',
     type  => 'textarea',
-    rows  => 4,
-    cols  => 30,
+    rows  => 8,
+    cols  => 50,
     label => 'Installation notes',
   },
 
index cde7449..dcf83de 100644 (file)
@@ -51,8 +51,8 @@ my @fields = (
   {
     field => 'note',
     type  => 'textarea',
-    rows  => 4,
-    cols  => 30,
+    rows  => 8,
+    cols  => 50,
     label => 'Installation notes',
   },
 
index 768c137..58da707 100644 (file)
@@ -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>
index 8201e9d..d982bc8 100644 (file)
@@ -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>