From: C.J. Adams-Collier Date: Fri, 26 Sep 2014 18:01:22 +0000 (-0700) Subject: FS RT #30363 - Hide usage data in self-service interface X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=698e8e9c11cea396fdb1e867b24bc2412e98781d FS RT #30363 - Hide usage data in self-service interface --- diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 0131d8969..86e4b8946 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -402,6 +402,7 @@ sub access_info { 'custnum' => $custnum, 'access_pkgnum' => $session->{'pkgnum'}, 'access_svcnum' => $session->{'svcnum'}, + 'hide_usage' => $conf->exists('selfservice_hide-usage'), }; } diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 1ed6b0cb6..940303fc5 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2760,6 +2760,13 @@ and customer address. Include units.', 'per_agent' => 1, }, + { + 'key' => 'selfservice_hide-usage', + 'section' => 'self-service', + 'description' => 'Hide usage data in self-service interface.', + 'type' => 'checkbox', + 'per_agent' => 1, + }, { 'key' => 'selfservice_process-pkgpart', diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html index 71f507010..4802178d0 100644 --- a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html +++ b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html @@ -64,8 +64,14 @@ if ( $balance > 0 ) { #XXXFIXME "enable selfservice prepay features" flag or som } push @menu, - { title=>' ' }, - { title=>'View my usage', url=>'view_usage', size=>'+1', }, + { title=>' ' }; + +unless( $hide_usage ){ + push @menu, + { title=>'View my usage', url=>'view_usage', size=>'+1', } +} + +push @menu, { title=>'Create a ticket', url=>'tktcreate', size=>'+1', }, ;