From: C.J. Adams-Collier Date: Fri, 26 Sep 2014 19:00:43 +0000 (-0700) Subject: FS RT #30363 - Hide Account usage template output in an HTML comment when $hide_usage... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3a7f3a2e81cc7423ba9a08fd4b28b3b5f4f227a2 FS RT #30363 - Hide Account usage template output in an HTML comment when $hide_usage is true --- diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 86e4b8946..bcfe35c2a 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 f50f77078..c43f7d3da 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!$error

!; @@ -216,4 +218,6 @@ foreach my $svc_port ( @svc_port ) { +<%= if( $hide_usage ){ $OUT .= '--'. '>' } %> <%= include('footer') %> +