summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/config/config-download.cgi18
-rw-r--r--httemplate/config/config-process.cgi12
-rw-r--r--httemplate/config/config-view.cgi8
-rw-r--r--httemplate/config/config.cgi6
-rw-r--r--httemplate/docs/man/FS/part_export/.cvs_is_on_crack0
-rwxr-xr-xhttemplate/edit/part_pkg.cgi44
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi2
-rw-r--r--httemplate/elements/menu.html1
-rw-r--r--httemplate/elements/phonenumber.html27
-rw-r--r--httemplate/pref/pref.html64
-rw-r--r--httemplate/search/report_cust_bill.html2
11 files changed, 57 insertions, 127 deletions
diff --git a/httemplate/config/config-download.cgi b/httemplate/config/config-download.cgi
deleted file mode 100644
index 95a172a51..000000000
--- a/httemplate/config/config-download.cgi
+++ /dev/null
@@ -1,18 +0,0 @@
-%
-%
-%my $conf=new FS::Conf;
-%
-%http_header('Content-Type' => 'application/x-unknown' );
-%
-%die "No configuration variable specified (bad URL)!" # umm
-% unless $cgi->keywords;
-%my($query) = $cgi->keywords;
-%$query =~ /^([\w -\)+-\/@;:?=[\]]+)$/;
-%my $name = $1;
-%
-%http_header('Content-Disposition' => "attachment; filename=$name" );
-% print $conf->config_binary($name);
-<%init>
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-</%init>
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index 3e49b4f99..d8f0d8e93 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -1,4 +1,5 @@
<%init>
+
die "access denied\n"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
@@ -27,16 +28,6 @@ foreach my $i ( @config_items ) {
} else {
$conf->delete($i->key);
}
- } elsif ( $type eq 'binary' ) {
- if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
- my $fh = $cgi->upload($i->key. $n);
- if (defined($fh)) {
- local $/;
- $conf->set_binary($i->key, <$fh>);
- }
- }else{
- warn "Condition failed for " . $i->key;
- }
} elsif ( $type eq 'checkbox' ) {
# if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
if ( defined $cgi->param($i->key. $n) ) {
@@ -66,5 +57,6 @@ foreach my $i ( @config_items ) {
$conf->touch($_) foreach @touch;
$conf->delete($_) foreach @delete;
}
+
</%init>
<% $cgi->redirect("config-view.cgi") %>
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 7f2a1b293..91ba33769 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -42,14 +42,6 @@
<tr>
<td><font color="#ff0000">no type</font></td>
</tr>
-% } elsif ( $type eq 'binary' ) {
-
- <tr>
- <% $conf->exists($i->key)
- ? qq!<a href="config-download.cgi?!. $i->key. qq!">download</a>!
- : 'empty'
- %>
- </tr>
% } elsif ( $type eq 'textarea'
% || $type eq 'editlist'
% || $type eq 'selectmultiple' ) {
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi
index df9af47a6..6c3a51aca 100644
--- a/httemplate/config/config.cgi
+++ b/httemplate/config/config.cgi
@@ -21,7 +21,7 @@ function SafeOnsubmit() {
% my $conf = new FS::Conf; my @config_items = $conf->config_items;
-<form name="OneTrueForm" action="config-process.cgi" METHOD="POST" enctype="multipart/form-data" onSubmit="SafeOnsubmit()">
+<form name="OneTrueForm" action="config-process.cgi" METHOD="POST" onSubmit="SafeOnsubmit()">
% foreach my $section ( qw(required billing username password UI session
% shell BIND
% ),
@@ -61,10 +61,6 @@ function SafeOnsubmit() {
<font color="#ff0000">no type</font>
-% } elsif ( $type eq 'binary' ) {
-
-
- Filename <input type="file" name="<% $i->key. $n %>">
% } elsif ( $type eq 'textarea' ) {
diff --git a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack b/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
deleted file mode 100644
index e69de29bb..000000000
--- a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
+++ /dev/null
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index ce3e8547f..77822d7e0 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -159,23 +159,23 @@ Line-item revenue recognition
</TD><TD VALIGN="top">
-Reseller information
-<% ntable("#cccccc", 2) %>
- <TR>
- <TD ALIGN="right"><% 'Agent Types' %></TD>
- <TD>
- <% include( '/elements/select-table.html',
- 'element_name' => 'agent_type',
- 'table' => 'agent_type',
- 'name_col' => 'atype',
- 'value' => \@agent_type,
- 'empty_label' => '(none)',
- 'element_etc' => 'multiple size="10"',
- )
- %>
- </TD>
- </TR>
-</TABLE>
+%#Reseller information # after 1.7.2
+%#<% ntable("#cccccc", 2) %>
+%# <TR>
+%# <TD ALIGN="right"><% 'Agent Types' %></TD>
+%# <TD>
+%# <% include( '/elements/select-table.html',
+%# 'element_name' => 'agent_type',
+%# 'table' => 'agent_type',
+%# 'name_col' => 'atype',
+%# 'value' => \@agent_type,
+%# 'empty_label' => '(none)',
+%# 'element_etc' => 'multiple size="10"',
+%# )
+%# %>
+%# </TD>
+%# </TR>
+%#</TABLE>
</TD></TR></TABLE>
%
%
@@ -271,7 +271,9 @@ Reseller information
%#} else {
%# push @fixups, 'taxclass'; #hidden
%#}
-%my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
+%my @form_elements = ( 'classnum', 'taxclass' );
+%# copying non-existant elements is probably harmless, but after 1.7.2
+%#my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
%
%my @form_radio = ();
%if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
@@ -328,7 +330,7 @@ Reseller information
% ( exists($plandata{$field})
% ? $plandata{$field}
% : $href->{$field}{'default'} ).
-% qq!">!;
+% qq!" onChange="fchanged(this)">!; #after 1.7.2
% } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
% $html .= qq!<INPUT TYPE="checkbox" NAME="$field" VALUE=1 !.
% ( exists($plandata{$field}) && $plandata{$field}
@@ -339,7 +341,7 @@ Reseller information
% $html .= '<SELECT';
% $html .= ' MULTIPLE'
% if $href->{$field}{'type'} eq 'select_multiple';
-% $html .= qq! NAME="$field">!;
+% $html .= qq! NAME="$field" onChange="fchanged(this)">!; # after 1.7.2
%
% if ( $href->{$field}{'select_table'} ) {
% foreach my $record (
@@ -383,7 +385,7 @@ Reseller information
%
% $html .= '<INPUT TYPE="submit" VALUE="'.
% ( $hashref->{pkgpart} ? "Apply changes" : "Add package" ).
-% '">';
+% '" onClick="fchanged(this)">'; #after 1.7.2
%
% $html;
%
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 1158222b6..55e7e05ae 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -55,7 +55,7 @@
% $pkgpart = $new->pkgpart;
%}
%
-%unless ($error) {
+%unless (1 || $error) { # after 1.7.2
% my $error = $new->process_m2m(
% 'link_table' => 'type_pkgs',
% 'target_table' => 'agent_type',
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index a58f25add..9565ff2d0 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -187,7 +187,6 @@ $report_menu{'Financial'} = [ \%report_financial, 'Financial reports' ]
tie my %tools_importing, 'Tie::IxHash',
'Import customers from CSV file' => [ $fsurl.'misc/cust_main-import.cgi', '' ],
- 'Import customer notes from CSV file' => [ $fsurl.'misc/cust_main_note-import.html', '' ],
'Import one-time charges from CSV file' => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ],
'Import Call Detail Records (CDRs) from CSV file' => [ $fsurl.'misc/cdr-import.html', '' ],
;
diff --git a/httemplate/elements/phonenumber.html b/httemplate/elements/phonenumber.html
index b1ae2aa2a..ffbd8c100 100644
--- a/httemplate/elements/phonenumber.html
+++ b/httemplate/elements/phonenumber.html
@@ -1,31 +1,22 @@
+%
+% my( $number, %opt ) = @_;
+% my $conf = new FS::Conf;
+% ( my $snumber = $number ) =~ s/\D//g;
+%
+
<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') ) {
-% if ( $opt{'callable'} && $curuser->option('vonage-username') ) {
-
- <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('https://secure.click2callu.com/tpcc/makecall?username=<% uri_escape($curuser->option('vonage-username')) %>&password=<% uri_escape($curuser->option('vonage-password')) %>&fromnumber=<% uri_escape($curuser->option('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>
-
-% }
-%
+ <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>
+% }
% } else {
&nbsp;
-
% }
-<%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";
-</%init>
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 229ac0e62..507a897d7 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -8,63 +8,39 @@
Change password (leave blank for no change)
<% ntable("#cccccc",2) %>
- <TR>
- <TH ALIGN="right">Current password: </TH>
- <TD><INPUT TYPE="password" NAME="_password"></TD>
- </TR>
+<TR>
+ <TD ALIGN="right">Current password: </TD>
+ <TD><INPUT TYPE="password" NAME="_password"></TD>
+</TR>
- <TR>
- <TH ALIGN="right">New password: </TH>
- <TD><INPUT TYPE="password" NAME="new_password"></TD>
- </TR>
+<TR>
+ <TD ALIGN="right">New password: </TD>
+ <TD><INPUT TYPE="password" NAME="new_password"></TD>
+</TR>
- <TR>
- <TH ALIGN="right">Re-enter new password: </TH>
- <TD><INPUT TYPE="password" NAME="new_password2"></TD>
- </TR>
+<TR>
+ <TD ALIGN="right">Re-enter new password: </TD>
+ <TD><INPUT TYPE="password" NAME="new_password2"></TD>
+</TR>
</TABLE>
<BR>
-
Interface
<% ntable("#cccccc",2) %>
- <TR>
- <TH>Menu location: </TH>
- <TD>
- <INPUT TYPE="radio" NAME="menu_position" VALUE="left" onClick="document.images['menu_example'].src='../images/menu-left-example.png';" <% $menu_position eq 'left' ? ' CHECKED' : ''%>> Left<BR>
- <INPUT TYPE="radio" NAME="menu_position" VALUE="top"onClick="document.images['menu_example'].src='../images/menu-top-example.png';" <% $menu_position eq 'top' ? ' CHECKED' : ''%>> Top <BR>
- </TD>
- <TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
- </TR>
+<TR>
+ <TD>Menu location: </TD>
+ <TD>
+ <INPUT TYPE="radio" NAME="menu_position" VALUE="left" onClick="document.images['menu_example'].src='../images/menu-left-example.png';" <% $menu_position eq 'left' ? ' CHECKED' : ''%>> Left<BR>
+ <INPUT TYPE="radio" NAME="menu_position" VALUE="top"onClick="document.images['menu_example'].src='../images/menu-top-example.png';" <% $menu_position eq 'top' ? ' CHECKED' : ''%>> Top <BR>
+ </TD>
+ <TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
+</TR>
</TABLE>
<BR>
-
-Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>)
-<% ntable("#cccccc",2) %>
-
- <TR>
- <TH ALIGN="right">Vonage phone number</TH>
- <TD><INPUT TYPE="text" NAME="vonage-fromnumber"></TD>
- </TR>
-
- <TR>
- <TH ALIGN="right">Vonage username</TH>
- <TD><INPUT TYPE="text" NAME="vonage-username"></TD>
- </TR>
-
- <TR>
- <TH ALIGN="right">Vonage password</TH>
- <TD><INPUT TYPE="password" NAME="vonage-password"></TD>
- </TR>
-
-</TABLE>
-<BR>
-
-
% foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
<INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
<SCRIPT TYPE="text/javascript">
diff --git a/httemplate/search/report_cust_bill.html b/httemplate/search/report_cust_bill.html
index 74b96cc90..4fa09f96c 100644
--- a/httemplate/search/report_cust_bill.html
+++ b/httemplate/search/report_cust_bill.html
@@ -5,7 +5,7 @@
<TABLE>
<% include( '/elements/tr-select-agent.html',
- $cgi->param('agentnum') ? $cgi->param('agentnum') : '',
+ $cgi->param('agentnum'),
'label' => 'Invoices for agent: ',
)
%>