summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm1
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--fs_selfservice/FS-SelfService/cgi/myaccount_menu.html10
3 files changed, 16 insertions, 2 deletions
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', },
;