summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/bill_batch.cgi99
-rwxr-xr-xhttemplate/view/cust_main.cgi22
-rw-r--r--httemplate/view/cust_main/billing.html7
-rw-r--r--httemplate/view/cust_main/misc.html31
-rwxr-xr-xhttemplate/view/cust_main/packages.html3
-rw-r--r--httemplate/view/cust_main/packages/services.html5
-rw-r--r--httemplate/view/cust_main/tickets.html29
-rw-r--r--httemplate/view/prospect_main.html3
-rw-r--r--httemplate/view/svc_acct/communigate.html40
-rw-r--r--httemplate/view/svc_domain/acct_defaults.html2
-rw-r--r--httemplate/view/svc_domain/dns.html5
-rwxr-xr-xhttemplate/view/svc_forward.cgi3
12 files changed, 24 insertions, 225 deletions
diff --git a/httemplate/view/bill_batch.cgi b/httemplate/view/bill_batch.cgi
deleted file mode 100644
index 3fca6ebbe..000000000
--- a/httemplate/view/bill_batch.cgi
+++ /dev/null
@@ -1,99 +0,0 @@
-% if($magic eq 'print') {
-<% include('/elements/header.html', "Download Batch") %>
-<FORM NAME="OneTrueForm">
-<INPUT TYPE="hidden" NAME="batchnum" VALUE="<% $batchnum %>">
-% $cgi->delete('magic');
-<% include('/elements/progress-init.html',
- 'OneTrueForm',
- [ 'batchnum' ],
- $p.'misc/process/bill_batch-print.html',
- {'url' => $cgi->self_url . ';magic=download'},
- '',
-) %></FORM>
-<SCRIPT TYPE="text/javascript">process();</SCRIPT>
-<% include('/elements/footer.html') %>
-% }
-%
-% elsif($magic eq 'download') {
-% $m->clear_buffer;
-% $r->content_type('application/pdf');
-% $r->headers_out->add('Content-Disposition' => 'attachment;filename="invoice_batch_'.$batchnum.'.pdf"');
-<% $batch->pdf %>
-% $batch->pdf('');
-% my $error = $batch->replace;
-% warn "error deleting cached PDF: '$error'\n" if $error;
-% }
-% else {
-<% include('/search/elements/search.html',
- 'title' => $close ?
- "Batch $batchnum closed." :
- "Invoice Batch $batchnum",
- 'name' => 'invoices',
- 'query' => { 'table' => 'cust_bill_batch',
- 'select' => join(', ',
- 'cust_bill.*',
- FS::UI::Web::cust_sql_fields(),
- 'cust_main.custnum AS cust_main_custnum',
- ),
- 'hashref' => { },
- 'addl_from' =>
- 'LEFT JOIN cust_bill USING ( invnum ) '.
- 'LEFT JOIN cust_main USING ( custnum )',
- 'extra_sql' => '',
- " WHERE batchnum = $batchnum",
- },
- 'count_query' => "SELECT COUNT(*) FROM cust_bill_batch WHERE batchnum = $batchnum",
- 'html_init' => $html_init,
- 'header' => [ 'Invoice #',
- 'Amount',
- 'Date',
- 'Customer',
- ],
- 'fields' => [ sub { shift->cust_bill->display_invnum },
- sub { sprintf($money_char.'%.2f',
- shift->cust_bill->charged ) },
- sub { time2str('%b %d %Y',
- shift->cust_bill->_date ) },
- sub { shift->cust_bill->cust_main->name },
- ],
- 'align' => 'rrll',
- 'links' => [ ($link) x 3, $clink,
- ],
- 'really_disable_download' => 1,
-) %>
-% }
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
-
-my $conf = new FS::Conf;
-my $batch;
-my $batchnum = $cgi->param('batchnum');
-
-$batch = FS::bill_batch->by_key($batchnum);
-die "Batch '$batchnum' not found!\n" if !$batch;
-
-my $magic = $cgi->param('magic');
-my $html_init = '';
-
-my $close = $cgi->param('close');
-$batch->close if $close;
-
-if(!$magic) {
- $cgi->param('magic' => 'print');
- $cgi->delete('close');
- $html_init = '<A HREF="'.$cgi->self_url.'">Download this batch</A><BR>';
- if($batch->status eq 'O') {
- $cgi->param('close' => 1);
- $cgi->delete('magic');
- $html_init .= '<A HREF="'.$cgi->self_url.'">Close this batch</A><BR>';
- }
- $html_init .= '<BR>';
-}
-
-my $link = [ "$p/view/cust_bill.cgi?", 'invnum' ];
-my $clink = [ "$p/view/cust_main.cgi?", 'custnum' ];
-my $money_char = $conf->config('money_char') || '$';
-
-</%init>
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index f6bef43ba..ca8bf5442 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -4,22 +4,6 @@
})
%>
<BR>
-% my @part_tag = $cust_main->part_tag;
-% if ( $conf->config('cust_tag-location') eq 'top' && @part_tag ) {
-<TABLE STYLE="margin-bottom:8px" CELLSPACING=2>
-% foreach my $part_tag ( @part_tag ) {
-<TR>
- <TD>
- <FONT SIZE="+1"
- <% length($part_tag->tagcolor)
- ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
- : ''
- %>><% $part_tag->tagname.': '. $part_tag->tagdesc |h %></FONT>
- </TD>
-</TR>
-% }
-</TABLE>
-% }
<% include('/elements/menubar.html',
{ 'newstyle' => 1,
@@ -29,7 +13,7 @@
%views,
)
%>
-<DIV CLASS="fstabcontainer">
+<BR>
<% include('/elements/init_overlib.html') %>
@@ -90,9 +74,6 @@ function areyousure(href, message) {
This customer's signup URL: <A HREF="<% $signupurl %>?ref=<% $custnum %>"><% $signupurl %>?ref=<% $custnum %></A><BR><BR>
% }
-%if ( $conf->exists('maestro-status_test') ) {
- <A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $custnum %>">Test maestro status</A><BR><BR>
-% }
<A NAME="cust_main"></A>
<TABLE BORDER=0>
@@ -233,7 +214,6 @@ Comments
<% include('cust_main/change_history.html', $cust_main ) %>
% }
-</DIV>
<% include('/elements/footer.html') %>
<%init>
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index 54c180bdd..c8d0c47cd 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -5,12 +5,7 @@ Billing information
%if ( $FS::CurrentUser::CurrentUser->access_right('Bill customer now')
% && ! $cust_main->is_encrypted($cust_main->payinfo)
% ) {
-%# (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
- (<% include('/elements/bill.html',
- custnum => $cust_main->custnum,
- label => 'Bill now',
- url => $p.'view/cust_main.cgi?'.$cust_main->custnum,
- ) %>)
+ (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
% }
<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index 6e90a0b4c..2cfe0263f 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -10,25 +10,12 @@
<TD BGCOLOR="#ffffff"><FONT COLOR="#<% $cust_main->statuscolor %>"><B><% ucfirst($cust_main->status) %></B></FONT></TD>
</TR>
-% my @part_tag = $cust_main->part_tag;
-% if ( $conf->config('cust_tag-location') =~ /^(cust_misc|)$/ && @part_tag ) {
-<TR>
- <TD ALIGN="right">Tags</TD>
- <TD BGCOLOR="#ffffff">
-% foreach my $part_tag ( @part_tag ) {
- <FONT <% length($part_tag->tagcolor)
- ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
- : '' %>
- ><% $part_tag->tagname.': '. $part_tag->tagdesc |h %></FONT>
- <BR>
-% }
- </TD>
-</TR>
-% }
-
-%unless ( scalar(@agentnums) == 1
-% && !$curuser->access_right('View customers of all agents') ) {
-% my $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
+%my $agent;
+%if ( $num_agents == 1 ) {
+% my @agents = qsearchs( 'agent', {} );
+% $agent = $agents[0];
+%} else {
+% $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
<TR>
<TD ALIGN="right">Agent</TD>
<TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD>
@@ -132,8 +119,8 @@ my( $cust_main ) = @_;
my $conf = new FS::Conf;
my $date_format = ($conf->config('date_format') || "%m/%d/%Y");
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-my @agentnums = $curuser->agentnums;
+my $sth = dbh->prepare('SELECT COUNT(*) FROM agent') or die dbh->errstr;
+$sth->execute or die $sth->errstr;
+my $num_agents = $sth->fetchrow_arrayref->[0];
</%init>
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 811ac3c98..3ac4861c3 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -159,8 +159,7 @@ my %conf_opt = (
#for services.html
'svc_external-skip_manual' => $conf->exists('svc_external-skip_manual'),
'legacy_link' => $conf->exists('legacy_link'),
- 'svc_broadband-manage_link' => scalar($conf->config('svc_broadband-manage_link')),
- 'maestro-status_test' => $conf->exists('maestro-status_test'),
+ 'svc_broadband-manage_link' => $conf->config('svc_broadband-manage_link'),
);
#subroutines
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 6e30922c5..0fe7931d8 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -58,11 +58,6 @@
% if ( $curuser->access_right('Unprovision customer service') ) {
<FONT SIZE="-2">(&nbsp;<%svc_unprovision_link($cust_svc)%>&nbsp;)</FONT>
% }
-
-% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ){
- <FONT SIZE="-2">(&nbsp;<A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A>&nbsp;)</FONT>
-% }
-
</TD>
</TR>
% }
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index e90ae5276..e1f9a131e 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -1,31 +1,17 @@
-<FORM METHOD="GET" NAME="CreateTicketForm" STYLE="display:inline">
-<SCRIPT TYPE="text/javascript">
-function updateTicketLink() {
- var link = document.getElementById('CreateTicketLink');
- var selector = document.getElementById('Queue')
- link.href = "<% $new_base.'?'.
- join(';', map(
- { ($_ eq 'Queue') ? () : "$_=$new_param{$_}"}
- keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
-}
-</SCRIPT>
-<A id="CreateTicketLink" HREF="<% $new_link %>">Create new ticket</A>
- in queue
+<FORM METHOD="GET" ACTION="<% $new_base %>" NAME="CreateTicketForm">
+<INPUT TYPE="submit" VALUE="Create new ticket">
+in queue
+<SELECT NAME="Queue">
% my %queues = FS::TicketSystem->queues();
-% if( $conf->exists('ticket_system-force_default_queueid') ) {
-<B><% $queues{$new_param{'Queue'}} %></B>
-<INPUT TYPE="hidden" NAME="Queue" VALUE="<% $new_param{'Queue'} %>">
-% }
-% else {
-<SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()">
-% foreach my $queueid ( sort { $queues{$a} cmp $queues{$b} } keys %queues ) {
+% foreach my $queueid ( keys %queues ) {
% #should consider whether the user has ACL to create ticket in each queue
<OPTION VALUE="<% $queueid %>"
<% $queueid == $new_param{'Queue'} ? 'SELECTED' : '' %>
><% $queues{$queueid} |h %>
% }
</SELECT>
-<SCRIPT DEFER TYPE="text/javascript">updateTicketLink();</SCRIPT>
+% foreach my $param ( grep { $_ ne 'Queue' } keys %new_param ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $new_param{$param} |h %>">
% }
</FORM>
<BR>
@@ -93,7 +79,6 @@ function updateTicketLink() {
<%init>
-my( $conf ) = new FS::Conf;
my( $cust_main ) = @_;
my( @tickets ) = $cust_main->tickets;
diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html
index 9517e3920..9883e6766 100644
--- a/httemplate/view/prospect_main.html
+++ b/httemplate/view/prospect_main.html
@@ -14,8 +14,7 @@
<TD BGCOLOR="#FFFFFF"><B><% $prospectnum %></B></TD>
</TR>
-%unless ( scalar(@agentnums) == 1
-% && !$curuser->access_right('View customers of all agents') ) {
+%unless ( scalar(@agentnums) == 1 ) {
% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } );
<TR>
<TD ALIGN="right">Agent</TD>
diff --git a/httemplate/view/svc_acct/communigate.html b/httemplate/view/svc_acct/communigate.html
index 0f090fdb9..9d6680750 100644
--- a/httemplate/view/svc_acct/communigate.html
+++ b/httemplate/view/svc_acct/communigate.html
@@ -53,45 +53,7 @@
<% include('/view/elements/tr.html', label=>'Send read receipts',
value=>$svc_acct->cgp_sendmdnmode ) %>
-%# vacation message
-%#XXX finish me... do we need to search for specific rules
-%# (and hide them?) need to see what CGP gives back after we've added a rule
- <% include('/elements/init_overlib.html') %>
-
- <TR>
- <TD ALIGN="right">Vacation message</TD>
- <TD BGCOLOR="#FFFFFF">
- <% include('/elements/popup_link.html',
- 'action' => $p.'edit/cgp_rule-vacation.html?'.
- 'svcnum='. $svc_acct->svcnum,
- 'label' => '(add)', #XXX (edit)
- 'actionlabel' => 'Vacation message',
- 'width' => 600,
- 'height' => 300,
- #'color'
- )
- %>
- </TD>
- </TR>
-
-%# redirect all mail
-%#XXX finish me...
-
- <TR>
- <TD ALIGN="right">Redirect all mail</TD>
- <TD BGCOLOR="#FFFFFF">
- <% include('/elements/popup_link.html',
- 'action' => $p.'edit/cgp_rule-redirect_all.html?'.
- 'svcnum='. $svc_acct->svcnum,
- 'label' => '(add)', #XXX (edit)
- 'actionlabel' => 'Redirect all mail',
- 'width' => 763,
- #'height'
- #'color'
- )
- %>
- </TD>
- </TR>
+%#XXX vacation message, redirect all mail
%# mail rules
diff --git a/httemplate/view/svc_domain/acct_defaults.html b/httemplate/view/svc_domain/acct_defaults.html
index 3a4e187be..b6d03e2df 100644
--- a/httemplate/view/svc_domain/acct_defaults.html
+++ b/httemplate/view/svc_domain/acct_defaults.html
@@ -36,7 +36,7 @@
%>
<% include('/view/elements/tr.html',
- label=>'Files limit',
+ label=>'Files limt',
value=>$svc_domain->acct_def_file_maxnum,
)
%>
diff --git a/httemplate/view/svc_domain/dns.html b/httemplate/view/svc_domain/dns.html
index 88a9bda95..f6f8c71c7 100644
--- a/httemplate/view/svc_domain/dns.html
+++ b/httemplate/view/svc_domain/dns.html
@@ -71,11 +71,10 @@ DNS records
<FORM NAME="SlaveForm" METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
- Or
% if ( @records ) {
- delete all records and
+ Delete all records and
% }
- slave from nameserver IP
+ Or slave from nameserver IP
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
<INPUT TYPE="hidden" NAME="reczone" VALUE="@">
<INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi
index 15b5ae56f..43d8a4e8b 100755
--- a/httemplate/view/svc_forward.cgi
+++ b/httemplate/view/svc_forward.cgi
@@ -50,9 +50,6 @@
</TABLE>
<BR>
-
-<% include('elements/svc_export_settings.html', $svc_forward) %>
-
<% joblisting({'svcnum'=>$svcnum}, 1) %>
<% include('/elements/footer.html') %>