[freeside-commits] freeside/FS/FS Schema.pm, 1.95, 1.96 svc_phone.pm, 1.9, 1.10

Ivan,,, ivan at wavetail.420.am
Sat Aug 2 19:15:10 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv17186/FS/FS

Modified Files:
	Schema.pm svc_phone.pm 
Log Message:
add a name field to svc_phone

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- Schema.pm	2 Aug 2008 04:20:15 -0000	1.95
+++ Schema.pm	3 Aug 2008 02:15:07 -0000	1.96
@@ -2036,6 +2036,7 @@
         'phonenum',     'varchar',     '',      15, '', '',  #12 ?
         'pin',          'varchar', 'NULL', $char_d, '', '',
         'sip_password', 'varchar', 'NULL', $char_d, '', '',
+        'phone_name',   'varchar', 'NULL', $char_d, '', '',
       ],
       'primary_key' => 'svcnum',
       'unique' => [],

Index: svc_phone.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_phone.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- svc_phone.pm	21 Jul 2008 10:42:29 -0000	1.9
+++ svc_phone.pm	3 Aug 2008 02:15:07 -0000	1.10
@@ -56,6 +56,8 @@
 
 Voicemail PIN
 
+=item phone_name
+
 =back
 
 =head1 METHODS
@@ -92,6 +94,7 @@
                             disable_select => 1,
                           },
         'sip_password' => 'SIP password',
+        'name'         => 'Name',
     },
   };
 }
@@ -117,7 +120,10 @@
 
 sub label {
   my $self = shift;
-  $self->phonenum; #XXX format it better
+  my $phonenum = $self->phonenum; #XXX format it better
+  my $label = $phonenum;
+  $label .= ' ('.$self->phone_name.')' if $self->phone_name;
+  $label;
 }
 
 =item insert
@@ -182,6 +188,7 @@
     || $self->ut_number('phonenum')
     || $self->ut_anything('sip_password')
     || $self->ut_numbern('pin')
+    || $self->ut_textn('phone_name')
   ;
   return $error if $error;
 



More information about the freeside-commits mailing list