'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' => [],
Voicemail PIN
+=item phone_name
+
=back
=head1 METHODS
disable_select => 1,
},
'sip_password' => 'SIP password',
+ 'name' => 'Name',
},
};
}
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
|| $self->ut_number('phonenum')
|| $self->ut_anything('sip_password')
|| $self->ut_numbern('pin')
+ || $self->ut_textn('phone_name')
;
return $error if $error;
},
'sip_password',
'pin',
+ 'phone_name',
],
'labels' => {
'countrycode' => 'Country code',
'phonenum' => 'Phone number',
'sip_password' => 'SIP password',
'pin' => 'Voicemail PIN',
+ 'phone_name' => 'Name',
},
)
%>
<% include('elements/svc_Common.html',
'table' => 'svc_phone',
- 'fields' => [qw( countrycode phonenum sip_password pin )],
+ 'fields' => [qw(
+ countrycode
+ phonenum
+ sip_password
+ pin
+ phone_name
+ )],
'labels' => {
'countrycode' => 'Country code',
'phonenum' => 'Phone number',
'sip_password' => 'SIP password',
'pin' => 'PIN',
+ 'phone_name' => 'Name',
},
'html_foot' => $html_foot,
)