From 7b3d074cbb694330334469510548d98eebe196ed Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 16 Mar 2007 01:35:55 +0000 Subject: vonage click2call integration should not be sitewide, especially now that we have user prefs --- httemplate/elements/phonenumber.html | 27 ++++++++++----- httemplate/pref/pref.html | 64 +++++++++++++++++++++++++----------- 2 files changed, 62 insertions(+), 29 deletions(-) (limited to 'httemplate') diff --git a/httemplate/elements/phonenumber.html b/httemplate/elements/phonenumber.html index ffbd8c100..b1ae2aa2a 100644 --- a/httemplate/elements/phonenumber.html +++ b/httemplate/elements/phonenumber.html @@ -1,22 +1,31 @@ -% -% my( $number, %opt ) = @_; -% my $conf = new FS::Conf; -% ( my $snumber = $number ) =~ s/\D//g; -% - + % if ( length($number) ) { <% $number %> -% if ( $opt{'callable'} && $conf->config('vonage-username') ) { - Call this number -% } +% if ( $opt{'callable'} && $curuser->option('vonage-username') ) { + + Call this number + +% } +% % } else {   + % } +<%init> + +my( $number, %opt ) = @_; +( my $snumber = $number ) =~ s/\D//g; + +my $curuser = $FS::CurrentUser::CurrentUser; + +( my $vonage_number = $curuser->option('vonage-fromnumber') ) =~ s/\D//g; +$vonage_number =~ /^1/ or $vonage_number = "1$vonage_number"; + diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index 507a897d7..229ac0e62 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -8,39 +8,63 @@ Change password (leave blank for no change) <% ntable("#cccccc",2) %> - - Current password: - - + + Current password: + + - - New password: - - + + New password: + + - - Re-enter new password: - - + + Re-enter new password: + +
+ Interface <% ntable("#cccccc",2) %> - - Menu location: - - > Left
- > Top
- - - + + Menu location: + + > Left
+ > Top
+ + +
+ +Vonage integration (see Click2Call) +<% ntable("#cccccc",2) %> + + + Vonage phone number + + + + + Vonage username + + + + + Vonage password + + + + +
+ + % foreach my $prop (qw( height width availHeight availWidth colorDepth )) {