summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC.J. Adams-Collier <cjac@colliertech.org>2014-09-26 12:00:43 -0700
committerC.J. Adams-Collier <cjac@colliertech.org>2014-09-26 12:00:43 -0700
commit3a7f3a2e81cc7423ba9a08fd4b28b3b5f4f227a2 (patch)
tree35de9607b02019e411e1fc01e98506bf06c4dbaa
parent698e8e9c11cea396fdb1e867b24bc2412e98781d (diff)
FS RT #30363 - Hide Account usage template output in an HTML comment when $hide_usage is true
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm3
-rw-r--r--fs_selfservice/FS-SelfService/cgi/view_usage.html4
2 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 86e4b89..bcfe35c 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -398,11 +398,12 @@ sub access_info {
$info->{'timeout'} = $conf->config('selfservice-timeout') || 3600;
+ $info->{'hide_usage'} = $conf->exists('selfservice_hide-usage');
+
return { %$info,
'custnum' => $custnum,
'access_pkgnum' => $session->{'pkgnum'},
'access_svcnum' => $session->{'svcnum'},
- 'hide_usage' => $conf->exists('selfservice_hide-usage'),
};
}
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html
index f50f770..c43f7d3 100644
--- a/fs_selfservice/FS-SelfService/cgi/view_usage.html
+++ b/fs_selfservice/FS-SelfService/cgi/view_usage.html
@@ -18,6 +18,8 @@
'';
%>
<%= include('header', 'Account usage') %>
+<%= if( $hide_usage ){ $OUT .= '<' . '!--' } %>
+
<%= if ( $error ) {
$OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
@@ -216,4 +218,6 @@ foreach my $svc_port ( @svc_port ) {
</TD></TR></TABLE>
+<%= if( $hide_usage ){ $OUT .= '--'. '>' } %>
<%= include('footer') %>
+