[freeside-commits] branch master updated. 698e8e9c11cea396fdb1e867b24bc2412e98781d

Carl J. Adams-Collier cjac at 420.am
Fri Sep 26 11:01:25 PDT 2014


The branch, master has been updated
       via  698e8e9c11cea396fdb1e867b24bc2412e98781d (commit)
      from  75ba02c6ef43d30a6382cdb3ce82db8c7c05f6a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 698e8e9c11cea396fdb1e867b24bc2412e98781d
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Fri Sep 26 11:01:22 2014 -0700

    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 0131d89..86e4b89 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 1ed6b0c..940303f 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 71f5070..4802178 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', },
 ;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm                          |    1 +
 FS/FS/Conf.pm                                         |    7 +++++++
 fs_selfservice/FS-SelfService/cgi/myaccount_menu.html |   10 ++++++++--
 3 files changed, 16 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list