[freeside-commits] freeside/httemplate/elements phonenumber.html, 1.5, 1.5.2.1
Ivan,,,
ivan at wavetail.420.am
Mon Mar 31 20:49:31 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv25198
Modified Files:
Tag: FREESIDE_1_7_BRANCH
phonenumber.html
Log Message:
use popup_link element for phonenumber.html silly vonage popup
Index: phonenumber.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/phonenumber.html,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- phonenumber.html 22 Jan 2007 11:36:40 -0000 1.5
+++ phonenumber.html 1 Apr 2008 03:49:29 -0000 1.5.2.1
@@ -1,22 +1,40 @@
-%
-% my( $number, %opt ) = @_;
-% my $conf = new FS::Conf;
-% ( my $snumber = $number ) =~ s/\D//g;
-%
+<% include('/elements/init_overlib.html') %>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_iframe.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_draggable.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/iframecontentmws.js"></SCRIPT>
% if ( length($number) ) {
- <% $number %>
-% if ( $opt{'callable'} && $conf->config('vonage-username') ) {
+ <% $number %>
- <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('https://secure.click2callu.com/tpcc/makecall?username=<% $conf->config('vonage-username') %>&password=<% $conf->config('vonage-password') %>&fromnumber=<% $conf->config('vonage-fromnumber')%>&tonumber=1<% $snumber %>', 240, 64, 'call_popup'), CAPTION, 'Initiating call', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE, WIDTH, 240, HEIGHT, 64 ); return false;" TITLE="Call this number"><IMG SRC="<%$fsurl%>images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number"></A>
-% }
+% if ( $opt{'callable'} && $conf->config('vonage-username') ) {
+
+ <% include('/elements/popup_link.html',
+ 'action' =>
+ 'https://secure.click2callu.com/tpcc/makecall'.
+ '?username='. $conf->config('vonage-username').
+ '&password='. $conf->config('vonage-password').
+ "&fromnumber=$vonage_number".
+ "&tonumber=$snumber",
+ 'width' => 240,
+ 'height' => 64,
+ 'actionlabel' => 'Initiating call',
+ 'label' => qq!<IMG SRC="${fsurl}images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number">!,
+ )
+ %>
+
+% }
+%
% } else {
+
% }
+<%init>
+
+my( $number, %opt ) = @_;
+( my $snumber = $number ) =~ s/\D//g;
+my $conf = new FS::Conf;
+
+( my $vonage_number = $conf->config('vonage-fromnumber') ) =~ s/\D//g;
+$vonage_number =~ /^1/ or $vonage_number = "1$vonage_number";
+
+</%init>
More information about the freeside-commits
mailing list