From: ivan Date: Fri, 16 Mar 2007 01:35:55 +0000 (+0000) Subject: vonage click2call integration should not be sitewide, especially now that we have... X-Git-Tag: TRIXBOX_2_6~587 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=7b3d074cbb694330334469510548d98eebe196ed;p=freeside.git vonage click2call integration should not be sitewide, especially now that we have user prefs --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d9f7d1972..5f7cb8fec 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1852,26 +1852,6 @@ httemplate/docs/config.html 'type' => 'checkbox', }, - #these should become per-user... - { - 'key' => 'vonage-username', - 'section' => '', - 'description' => 'Vonage Click2Call username (see https://secure.click2callu.com/)', - 'type' => 'text', - }, - { - 'key' => 'vonage-password', - 'section' => '', - 'description' => 'Vonage Click2Call username (see https://secure.click2callu.com/)', - 'type' => 'text', - }, - { - 'key' => 'vonage-fromnumber', - 'section' => '', - 'description' => 'Vonage Click2Call number (see https://secure.click2callu.com/)', - 'type' => 'text', - }, - { 'key' => 'echeck-nonus', 'section' => 'billing', 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 )) {