summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/process/cust_svc.cgi2
-rwxr-xr-xhttemplate/edit/process/domain_record.cgi2
-rw-r--r--httemplate/edit/process/reg_code.cgi2
-rw-r--r--httemplate/edit/rate_region.cgi2
-rw-r--r--httemplate/edit/reg_code.cgi2
-rw-r--r--httemplate/elements/errorpage.html13
-rw-r--r--httemplate/elements/tr-select-part_referral.html2
-rwxr-xr-xhttemplate/misc/bill.cgi4
-rwxr-xr-xhttemplate/misc/cancel-unaudited.cgi4
-rw-r--r--httemplate/misc/delete-agent_payment_gateway.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_credit.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_pay.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_refund.cgi2
-rwxr-xr-xhttemplate/misc/delete-domain_record.cgi2
-rwxr-xr-xhttemplate/misc/delete-part_export.cgi2
-rw-r--r--httemplate/misc/dump.cgi2
-rw-r--r--httemplate/misc/inventory_item-import.html2
-rw-r--r--httemplate/misc/process/cdr-import.html2
-rw-r--r--httemplate/misc/process/cust_main-import.cgi2
-rw-r--r--httemplate/misc/process/cust_main-import_charges.cgi2
-rw-r--r--httemplate/misc/process/inventory_item-import.html2
-rwxr-xr-xhttemplate/misc/process/link.cgi4
-rw-r--r--httemplate/misc/process/payment.cgi34
-rwxr-xr-xhttemplate/misc/unapply-cust_credit.cgi2
-rwxr-xr-xhttemplate/misc/unapply-cust_pay.cgi2
-rwxr-xr-xhttemplate/misc/unprovision.cgi2
-rwxr-xr-xhttemplate/misc/unsusp_pkg.cgi2
-rwxr-xr-xhttemplate/misc/unvoid-cust_pay_void.cgi2
-rw-r--r--httemplate/misc/upload-batch.cgi2
-rwxr-xr-xhttemplate/misc/void-cust_pay.cgi2
-rwxr-xr-xhttemplate/search/cust_main.cgi28
-rw-r--r--httemplate/search/cust_svc.html2
-rw-r--r--httemplate/search/inventory_item.html2
-rw-r--r--httemplate/search/reg_code.html4
-rw-r--r--httemplate/search/sql.html2
-rwxr-xr-xhttemplate/search/svc_acct.cgi2
-rwxr-xr-xhttemplate/search/svc_broadband.cgi2
37 files changed, 81 insertions, 70 deletions
diff --git a/httemplate/edit/process/cust_svc.cgi b/httemplate/edit/process/cust_svc.cgi
index 3a07d1e7a..e9d5f6238 100644
--- a/httemplate/edit/process/cust_svc.cgi
+++ b/httemplate/edit/process/cust_svc.cgi
@@ -21,7 +21,7 @@
%if ( $error ) {
% #$cgi->param('error', $error);
% #print $cgi->redirect(popurl(2). "cust_svc.cgi?". $cgi->query_string );
-% eidiot($error);
+% errorpage($error);
%} else {
% my $svcdb = $new->part_svc->svcdb;
% print $cgi->redirect(popurl(3). "view/$svcdb.cgi?$svcnum");
diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi
index 87bdf6835..daf35ad6d 100755
--- a/httemplate/edit/process/domain_record.cgi
+++ b/httemplate/edit/process/domain_record.cgi
@@ -26,7 +26,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%} else {
% my $svcnum = $new->svcnum;
% print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum");
diff --git a/httemplate/edit/process/reg_code.cgi b/httemplate/edit/process/reg_code.cgi
index 4fdea60fc..d93bb55a2 100644
--- a/httemplate/edit/process/reg_code.cgi
+++ b/httemplate/edit/process/reg_code.cgi
@@ -1,7 +1,7 @@
%
%
%$cgi->param('agentnum') =~ /^(\d+)$/
-% or eidiot 'illegal agentnum '. $cgi->param('agentnum');
+% or errorpage('illegal agentnum '. $cgi->param('agentnum'));
%my $agentnum = $1;
%my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
%
diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi
index 12cb180de..bd3dcbd46 100644
--- a/httemplate/edit/rate_region.cgi
+++ b/httemplate/edit/rate_region.cgi
@@ -27,7 +27,7 @@
%if ( @rate_prefix ) {
% $countrycode = $rate_prefix[0]->countrycode;
% foreach my $rate_prefix ( @rate_prefix ) {
-% eidiot 'multiple country codes per region not yet supported by web UI'
+% errorpage('multiple country codes per region not yet supported by web UI')
% unless $rate_prefix->countrycode eq $countrycode;
% }
%}
diff --git a/httemplate/edit/reg_code.cgi b/httemplate/edit/reg_code.cgi
index 06bef4879..f5f0f7b66 100644
--- a/httemplate/edit/reg_code.cgi
+++ b/httemplate/edit/reg_code.cgi
@@ -1,6 +1,6 @@
%
%my $agentnum = $cgi->param('agentnum');
-%$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
+%$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
%$agentnum = $1;
%my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
%
diff --git a/httemplate/elements/errorpage.html b/httemplate/elements/errorpage.html
new file mode 100644
index 000000000..d28055efb
--- /dev/null
+++ b/httemplate/elements/errorpage.html
@@ -0,0 +1,13 @@
+<% include("/elements/header.html", "Error processing your request") %>
+
+Your request could not be processed because of the following error<% (scalar(@_) > 1) ? 's' : '' %>:
+
+% while (@_) {
+
+<P><FONT SIZE="+1" COLOR="#ff0000"><B><% shift %></B></FONT>
+
+
+%}
+% $m->flush_buffer();
+% $HTML::Mason::Commands::m->abort();
+% #die "shouldn't fall through to here (mason \$m->abort didn't)";
diff --git a/httemplate/elements/tr-select-part_referral.html b/httemplate/elements/tr-select-part_referral.html
index cd26c254d..62795e9b2 100644
--- a/httemplate/elements/tr-select-part_referral.html
+++ b/httemplate/elements/tr-select-part_referral.html
@@ -1,5 +1,5 @@
% if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
-% eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.html and create one or more advertising sources.";
+ <P><FONT SIZE="+1" COLOR="#ff0000">You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to <A HREF="<% popurl(2) %>browse/part_referral.html">advertising source listing</A> and create one or more advertising sources.</FONT>
% } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
<INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'refnum' %>" VALUE="<% $opt{'part_referrals'}->[0]->refnum %>">
diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi
index 1bf1eb11e..24dfd6bbd 100755
--- a/httemplate/misc/bill.cgi
+++ b/httemplate/misc/bill.cgi
@@ -11,7 +11,6 @@
%my $error = $cust_main->bill(
%# 'time'=>$time
% );
-%#&eidiot($error) if $error;
%
%unless ( $error ) {
% $error = $cust_main->apply_payments_and_credits
@@ -33,14 +32,13 @@
% #'realtime' => $conf->exists('realtime-backend'),
% );
%}
-%#&eidiot($error) if $error;
%
%if ( $error ) {
%
<!-- mason kludge -->
%
-% &idiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
%}
diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi
index 6f070a444..da60dc47b 100755
--- a/httemplate/misc/cancel-unaudited.cgi
+++ b/httemplate/misc/cancel-unaudited.cgi
@@ -14,7 +14,7 @@
%die "Unknown svcnum!" unless $cust_svc;
%my $cust_pkg = $cust_svc->cust_pkg;
%if ( $cust_pkg ) {
-% &eidiot( 'This account has already been audited. Cancel the '.
+% errorpage( 'This account has already been audited. Cancel the '.
% qq!<A HREF="${p}view/cust_main.cgi?!. $cust_pkg->custnum.
% '#cust_pkg'. $cust_pkg->pkgnum. '">'.
% 'package</A> instead.');
@@ -27,7 +27,7 @@
<!-- mason kludge -->
%
-% &eidiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2));
%}
diff --git a/httemplate/misc/delete-agent_payment_gateway.cgi b/httemplate/misc/delete-agent_payment_gateway.cgi
index fb0f1e4b8..20a202e0e 100644
--- a/httemplate/misc/delete-agent_payment_gateway.cgi
+++ b/httemplate/misc/delete-agent_payment_gateway.cgi
@@ -10,6 +10,6 @@
% });
%
% my $error = $agent_payment_gateway->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%
% print $cgi->redirect($p. "browse/agent.cgi");
diff --git a/httemplate/misc/delete-cust_credit.cgi b/httemplate/misc/delete-cust_credit.cgi
index e4756a922..78df24989 100755
--- a/httemplate/misc/delete-cust_credit.cgi
+++ b/httemplate/misc/delete-cust_credit.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_credit->custnum;
%
%my $error = $cust_credit->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-cust_pay.cgi b/httemplate/misc/delete-cust_pay.cgi
index 1fda82e2a..a0fa414d5 100755
--- a/httemplate/misc/delete-cust_pay.cgi
+++ b/httemplate/misc/delete-cust_pay.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay->custnum;
%
%my $error = $cust_pay->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-cust_refund.cgi b/httemplate/misc/delete-cust_refund.cgi
index 3e44560d0..f3ac589aa 100755
--- a/httemplate/misc/delete-cust_refund.cgi
+++ b/httemplate/misc/delete-cust_refund.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_refund->custnum;
%
%my $error = $cust_refund->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-domain_record.cgi b/httemplate/misc/delete-domain_record.cgi
index cccce357e..83e75ce20 100755
--- a/httemplate/misc/delete-domain_record.cgi
+++ b/httemplate/misc/delete-domain_record.cgi
@@ -8,7 +8,7 @@
%my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});
%
%my $error = $domain_record->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum);
%
diff --git a/httemplate/misc/delete-part_export.cgi b/httemplate/misc/delete-part_export.cgi
index 16389a90c..5f2ebb99c 100755
--- a/httemplate/misc/delete-part_export.cgi
+++ b/httemplate/misc/delete-part_export.cgi
@@ -8,7 +8,7 @@
%my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum});
%
%my $error = $part_export->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "browse/part_export.cgi");
%
diff --git a/httemplate/misc/dump.cgi b/httemplate/misc/dump.cgi
index e8f4b6f38..486b66568 100644
--- a/httemplate/misc/dump.cgi
+++ b/httemplate/misc/dump.cgi
@@ -7,7 +7,7 @@
% }
% open(DUMP,"pg_dump $dbname |");
% } else {
-% eidiot "don't (yet) know how to dump ". driver_name. " databases\n";
+% errorpage("don't (yet) know how to dump ". driver_name. " databases");
% }
%
% http_header('Content-Type' => 'text/plain' );
diff --git a/httemplate/misc/inventory_item-import.html b/httemplate/misc/inventory_item-import.html
index 87c6af34c..363623806 100644
--- a/httemplate/misc/inventory_item-import.html
+++ b/httemplate/misc/inventory_item-import.html
@@ -1,7 +1,7 @@
%
%
%my $classnum = $cgi->param('classnum');
-%$classnum =~ /^(\d+)$/ or eidiot "illegal classnum $classnum";
+%$classnum =~ /^(\d+)$/ or errorpage("illegal classnum $classnum");
%$classnum = $1;
%my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
%
diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html
index 68edaa21c..93137c3d0 100644
--- a/httemplate/misc/process/cdr-import.html
+++ b/httemplate/misc/process/cdr-import.html
@@ -14,7 +14,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/cust_main-import.cgi b/httemplate/misc/process/cust_main-import.cgi
index a5ede99a1..c8d1b6cd1 100644
--- a/httemplate/misc/process/cust_main-import.cgi
+++ b/httemplate/misc/process/cust_main-import.cgi
@@ -21,7 +21,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/cust_main-import_charges.cgi b/httemplate/misc/process/cust_main-import_charges.cgi
index e0ede576b..1a29bf600 100644
--- a/httemplate/misc/process/cust_main-import_charges.cgi
+++ b/httemplate/misc/process/cust_main-import_charges.cgi
@@ -16,7 +16,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import_charges.cgi
% } else {
diff --git a/httemplate/misc/process/inventory_item-import.html b/httemplate/misc/process/inventory_item-import.html
index f6159dc99..51337529f 100644
--- a/httemplate/misc/process/inventory_item-import.html
+++ b/httemplate/misc/process/inventory_item-import.html
@@ -14,7 +14,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi
index 7c71371ee..66f4ee11d 100755
--- a/httemplate/misc/process/link.cgi
+++ b/httemplate/misc/process/link.cgi
@@ -39,7 +39,7 @@
%
% my $svc_x = $svc_x[0];
%
-% eidiot("$link_field not found!") unless $svc_x;
+% errorpage("$link_field not found!") unless $svc_x;
%
% $svcnum = $svc_x->svcnum;
%
@@ -69,7 +69,7 @@
<!-- mason kludge -->
%
-% idiot($error);
+% errorpage($error);
%}
%
%
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 29157d8f0..6377b13e8 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -18,20 +18,20 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
die "unknown custnum $custnum" unless $cust_main;
$cgi->param('amount') =~ /^\s*(\d*(\.\d\d)?)\s*$/
- or eidiot "illegal amount ". $cgi->param('amount');
+ or errorpage("illegal amount ". $cgi->param('amount'));
my $amount = $1;
-eidiot "amount <= 0" unless $amount > 0;
+errorpage("amount <= 0") unless $amount > 0;
$cgi->param('year') =~ /^(\d+)$/
- or die "illegal year ". $cgi->param('year');
+ or errorpage("illegal year ". $cgi->param('year'));
my $year = $1;
$cgi->param('month') =~ /^(\d+)$/
- or die "illegal month ". $cgi->param('month');
+ or errorpage("illegal month ". $cgi->param('month'));
my $month = $1;
$cgi->param('payby') =~ /^(CARD|CHEK)$/
- or die "illegal payby ". $cgi->param('payby');
+ or errorpage("illegal payby ". $cgi->param('payby'));
my $payby = $1;
my %payby2fields = (
'CARD' => [ qw( address1 address2 city state zip ) ],
@@ -42,11 +42,11 @@ my %type = ( 'CARD' => 'credit card',
);
$cgi->param('payname') =~ /^([\w \,\.\-\']+)$/
- or eidiot gettext('illegal_name'). " payname: ". $cgi->param('payname');
+ or errorpage(gettext('illegal_name'). " payname: ". $cgi->param('payname'));
my $payname = $1;
$cgi->param('payunique') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
- or eidiot gettext('illegal_text'). " payunique: ". $cgi->param('payunique');
+ or errorpage(gettext('illegal_text'). " payunique: ". $cgi->param('payunique'));
my $payunique = $1;
my $payinfo;
@@ -57,10 +57,10 @@ if ( $payby eq 'CHEK' ) {
$payinfo = $cust_main->payinfo;
} else {
$cgi->param('payinfo1') =~ /^(\d+)$/
- or eidiot "illegal account number ". $cgi->param('payinfo1');
+ or errorpage("illegal account number ". $cgi->param('payinfo1'));
my $payinfo1 = $1;
$cgi->param('payinfo2') =~ /^(\d+)$/
- or eidiot "illegal ABA/routing number ". $cgi->param('payinfo2');
+ or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2'));
my $payinfo2 = $1;
$payinfo = $payinfo1. '@'. $payinfo2;
}
@@ -73,22 +73,22 @@ if ( $payby eq 'CHEK' ) {
}
$payinfo =~ s/\D//g;
$payinfo =~ /^(\d{13,16})$/
- or eidiot gettext('invalid_card'); # . ": ". $self->payinfo;
+ or errorpage(gettext('invalid_card')); # . ": ". $self->payinfo;
$payinfo = $1;
validate($payinfo)
- or eidiot gettext('invalid_card'); # . ": ". $self->payinfo;
- eidiot gettext('unknown_card_type')
+ or errorpage(gettext('invalid_card')); # . ": ". $self->payinfo;
+ errorpage(gettext('unknown_card_type'))
if cardtype($payinfo) eq "Unknown";
if ( defined $cust_main->dbdef_table->column('paycvv') ) {
if ( length($cgi->param('paycvv') ) ) {
if ( cardtype($payinfo) eq 'American Express card' ) {
$cgi->param('paycvv') =~ /^(\d{4})$/
- or eidiot "CVV2 (CID) for American Express cards is four digits.";
+ or errorpage("CVV2 (CID) for American Express cards is four digits.");
$paycvv = $1;
} else {
$cgi->param('paycvv') =~ /^(\d{3})$/
- or eidiot "CVV2 (CVC2/CID) is three digits.";
+ or errorpage("CVV2 (CVC2/CID) is three digits.");
$paycvv = $1;
}
}
@@ -110,7 +110,7 @@ if ( $cgi->param('batch') ) {
map { $_ => $cgi->param($_) }
@{$payby2fields{$payby}}
);
- eidiot($error) if $error;
+ errotpage($error) if $error;
} else {
@@ -124,7 +124,7 @@ if ( $cgi->param('batch') ) {
'paycvv' => $paycvv,
map { $_ => $cgi->param($_) } @{$payby2fields{$payby}}
);
- eidiot($error) if $error;
+ errorpage($error) if $error;
$cust_main->apply_payments;
@@ -156,7 +156,7 @@ if ( $cgi->param('save') ) {
$new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
my $error = $new->replace($cust_main);
- eidiot "payment processed successfully, but error saving info: $error"
+ errorpage("payment processed successfully, but error saving info: $error")
if $error;
$cust_main = $new;
}
diff --git a/httemplate/misc/unapply-cust_credit.cgi b/httemplate/misc/unapply-cust_credit.cgi
index 56a3ff854..f8fa63268 100755
--- a/httemplate/misc/unapply-cust_credit.cgi
+++ b/httemplate/misc/unapply-cust_credit.cgi
@@ -10,7 +10,7 @@
%
%foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
% my $error = $cust_credit_bill->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%}
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
diff --git a/httemplate/misc/unapply-cust_pay.cgi b/httemplate/misc/unapply-cust_pay.cgi
index b28f61b0f..6bd6c07ee 100755
--- a/httemplate/misc/unapply-cust_pay.cgi
+++ b/httemplate/misc/unapply-cust_pay.cgi
@@ -10,7 +10,7 @@
%
%foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) {
% my $error = $cust_bill_pay->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%}
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
diff --git a/httemplate/misc/unprovision.cgi b/httemplate/misc/unprovision.cgi
index e42feda8a..b5e510695 100755
--- a/httemplate/misc/unprovision.cgi
+++ b/httemplate/misc/unprovision.cgi
@@ -22,7 +22,7 @@
<!-- mason kludge -->
%
-% &eidiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2)."view/cust_main.cgi?$custnum");
%}
diff --git a/httemplate/misc/unsusp_pkg.cgi b/httemplate/misc/unsusp_pkg.cgi
index 79c07a72a..80188c668 100755
--- a/httemplate/misc/unsusp_pkg.cgi
+++ b/httemplate/misc/unsusp_pkg.cgi
@@ -8,7 +8,7 @@
%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
%
%my $error = $cust_pkg->unsuspend;
-%&eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
%
diff --git a/httemplate/misc/unvoid-cust_pay_void.cgi b/httemplate/misc/unvoid-cust_pay_void.cgi
index 75c3edc06..625431a57 100755
--- a/httemplate/misc/unvoid-cust_pay_void.cgi
+++ b/httemplate/misc/unvoid-cust_pay_void.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay_void->custnum;
%
%my $error = $cust_pay_void->unvoid;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi
index 69d3ca6b1..5a15008b0 100644
--- a/httemplate/misc/upload-batch.cgi
+++ b/httemplate/misc/upload-batch.cgi
@@ -2,7 +2,7 @@
<!-- mason kludge -->
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/void-cust_pay.cgi b/httemplate/misc/void-cust_pay.cgi
index b55d22c41..972a1a5bd 100755
--- a/httemplate/misc/void-cust_pay.cgi
+++ b/httemplate/misc/void-cust_pay.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay->custnum;
%
%my $error = $cust_pay->void;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 56bb9ca41..b0f657fbb 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -87,10 +87,10 @@
% if ( $cgi->param('otaker_on') ) {
% die "access denied"
% unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-% $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n";
+% $cgi->param('otaker') =~ /^(\w{1,32})$/ or errorpage("Illegal otaker");
% $search{otaker} = $1;
% } elsif ( $cgi->param('agentnum_on') ) {
-% $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n";
+% $cgi->param('agentnum') =~ /^(\d+)$/ or errorpage("Illegal agentnum");
% $search{agentnum} = $1;
%# } else {
%# die "unknown query...";
@@ -232,7 +232,7 @@
<!-- mason kludge -->
%
-% eidiot "No matching customers found!\n";
+% errorpage("No matching customers found!");
%} else {
%
@@ -268,7 +268,7 @@
%
% if ( $cgi->param('referral_custnum') ) {
% $cgi->param('referral_custnum') =~ /^(\d+)$/
-% or eidiot "Illegal referral_custnum\n";
+% or errorpage("Illegal referral_custnum");
% my $referral_custnum = $1;
% my $cust_main = qsearchs('cust_main', { custnum => $referral_custnum } );
% print '<FORM METHOD="GET">'.
@@ -288,7 +288,7 @@
% print ' <SELECT NAME="referral_depth" SIZE="1" onChange="changed(this)">';
% my $max = 8; #config file
% $cgi->param('referral_depth') =~ /^(\d*)$/
-% or eidiot "Illegal referral_depth";
+% or errorpage("Illegal referral_depth");
% my $referral_depth = $1;
%
% foreach my $depth ( 1 .. $max ) {
@@ -550,7 +550,7 @@
%
% my $custnum = $cgi->param('custnum_text');
% $custnum =~ s/\D//g;
-% $custnum =~ /^(\d{1,23})$/ or eidiot "Illegal customer number\n";
+% $custnum =~ /^(\d{1,23})$/ or errorpage("Illegal customer number");
% $custnum = $1;
%
% [ qsearchs('cust_main', { 'custnum' => $custnum } ) ];
@@ -560,7 +560,7 @@
%
% my($card)=$cgi->param('card');
% $card =~ s/\D//g;
-% $card =~ /^(\d{13,16})$/ or eidiot "Illegal card number\n";
+% $card =~ /^(\d{13,16})$/ or errorpage("Illegal card number");
% my($payinfo)=$1;
%
% [ qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}),
@@ -570,13 +570,13 @@
%
%sub referralsearch {
% $cgi->param('referral_custnum') =~ /^(\d+)$/
-% or eidiot "Illegal referral_custnum";
+% or errorpage("Illegal referral_custnum");
% my $cust_main = qsearchs('cust_main', { 'custnum' => $1 } )
-% or eidiot "Customer $1 not found";
+% or errorpage("Customer $1 not found");
% my $depth;
% if ( $cgi->param('referral_depth') ) {
% $cgi->param('referral_depth') =~ /^(\d+)$/
-% or eidiot "Illegal referral_depth";
+% or errorpage("Illegal referral_depth");
% $depth = $1;
% } else {
% $depth = 1;
@@ -592,7 +592,7 @@
% }
%
% $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/
-% or eidiot "Illegal last name";
+% or errorpage("Illegal last name");
% my($last)=$1;
%
% if ( $last_type{'Exact'} || $last_type{'Fuzzy'} ) {
@@ -639,7 +639,7 @@
%
% $cgi->param('company_text') =~
% /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
-% or eidiot "Illegal company";
+% or errorpage("Illegal company");
% my $company = $1;
%
% if ( $company_type{'Exact'} || $company_type{'Fuzzy'} ) {
@@ -681,7 +681,7 @@
%
% $cgi->param('address2_text') =~
% /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
-% or eidiot "Illegal address2";
+% or errorpage("Illegal address2");
% my $address2 = $1;
%
% push @cust_main, qsearch( 'cust_main',
@@ -711,7 +711,7 @@
% } elsif ( $phone =~ /^(\d{3,4})$/ ) {
% $phone = $1;
% } else {
-% eidiot gettext('illegal_phone'). ": $phone";
+% errorpage(gettext('illegal_phone'). ": $phone");
% }
%
% my @fields = qw(daytime night fax);
diff --git a/httemplate/search/cust_svc.html b/httemplate/search/cust_svc.html
index 9a43a4139..3beca4d83 100644
--- a/httemplate/search/cust_svc.html
+++ b/httemplate/search/cust_svc.html
@@ -90,7 +90,7 @@ if ( length( $cgi->param('search_svc') ) ) {
push @extra_sql, "svcpart = $1";
} else {
- eidiot("No search term specified");
+ errorpage("No search term specified");
}
#here is the agent virtualization
diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html
index 1e7bdd91c..cd37e267b 100644
--- a/httemplate/search/inventory_item.html
+++ b/httemplate/search/inventory_item.html
@@ -77,7 +77,7 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $classnum = $cgi->param('classnum');
-$classnum =~ /^(\d+)$/ or eidiot "illegal classnum $classnum";
+$classnum =~ /^(\d+)$/ or errorpage("illegal classnum $classnum");
$classnum = $1;
my $inventory_class = qsearchs( {
diff --git a/httemplate/search/reg_code.html b/httemplate/search/reg_code.html
index 87e0fcdd5..f65b00d05 100644
--- a/httemplate/search/reg_code.html
+++ b/httemplate/search/reg_code.html
@@ -31,10 +31,10 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $agentnum = $cgi->param('agentnum');
-$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
+$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
$agentnum = $1;
my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
my $count_query = "SELECT COUNT(*) FROM reg_code WHERE agentnum = $agentnum";
-<%init>
+</%init>
diff --git a/httemplate/search/sql.html b/httemplate/search/sql.html
index 5f64ebc28..df9b8cddb 100644
--- a/httemplate/search/sql.html
+++ b/httemplate/search/sql.html
@@ -2,7 +2,7 @@
'title' => 'Query Results',
'name' => 'rows',
'query' => 'SELECT '. ( $cgi->param('sql')
- || eidiot('Empty query') ),
+ || errorpage('Empty query') ),
)
%>
<%init>
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index 1c1f1bfd9..8cd689a04 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -51,7 +51,7 @@ if ( $cgi->param('domain') ) {
unless ( $svc_domain ) {
#it would be nice if this looked more like the other "not found"
#errors, but this will do for now.
- eidiot "Domain ". $cgi->param('domain'). " not found at all";
+ errorpage("Domain ". $cgi->param('domain'). " not found at all");
} else {
push @extra_sql, 'domsvc = '. $svc_domain->svcnum;
}
diff --git a/httemplate/search/svc_broadband.cgi b/httemplate/search/svc_broadband.cgi
index fb1ecf4e1..56711615c 100755
--- a/httemplate/search/svc_broadband.cgi
+++ b/httemplate/search/svc_broadband.cgi
@@ -65,7 +65,7 @@
<!-- mason kludge -->
%
-% eidiot "No matching broadband services found!\n";
+% errorpage("No matching broadband services found!");
%} else {
%