[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 95dff12fca14eee00571a05688e77fcda1d53f1f

Ivan ivan at 420.am
Tue Feb 19 13:08:00 PST 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  95dff12fca14eee00571a05688e77fcda1d53f1f (commit)
      from  ca25af64f0a2f58e5c854ecfa3ce6dce57edb73c (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 95dff12fca14eee00571a05688e77fcda1d53f1f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Feb 19 13:07:59 2013 -0800

    config setting to disable menu entries in self-service, RT#14866

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 54dc9fa..f949246 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -122,6 +122,7 @@ sub skin_info {
             font title_color title_align title_size menu_bgcolor menu_fontsize
           )
       ),
+      'menu_disable' => [ $conf->config('selfservice-menu_disable',$agentnum) ],
       ( map { $_ => $conf->exists("selfservice-$_", $agentnum ) }
         qw( menu_skipblanks menu_skipheadings menu_nounderline no_logo )
       ),
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 0df38a2..502eba3 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -4359,6 +4359,31 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'selfservice-menu_disable',
+    'section'     => 'self-service',
+    'description' => 'Disable the selected menu entries in the self-service menu',
+    'type'        => 'selectmultiple',
+    'select_enum' => [ #false laziness w/myaccount_menu.html
+                       'Overview',
+                       'Purchase',
+                       'Purchase additional package',
+                       'Recharge my account with a credit card',
+                       'Recharge my account with a check',
+                       'Recharge my account with a prepaid card',
+                       'View my usage',
+                       'Create a ticket',
+                       'Setup my services',
+                       'Change my information',
+                       'Change billing address',
+                       'Change service address',
+                       'Change payment information',
+                       'Change password(s)',
+                       'Logout',
+                     ],
+    'per_agent'   => 1,
+  },
+
+  {
     'key'         => 'selfservice-menu_skipblanks',
     'section'     => 'self-service',
     'description' => 'Skip blank (spacer) entries in the self-service menu',
diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
index c7d2bb2..4a31b12 100644
--- a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
+++ b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html
@@ -88,11 +88,13 @@ push @menu,
   { title=>'Logout',   url=>'logout', size=>'+1', },
 ;
 
+my %menu_disable = map { $_=>1 } @menu_disable;
 foreach my $item ( @menu ) {
 
-  next if $menu_skipblanks && $item->{'title'} =~ /^\s*$/;
-  next if $menu_skipheadings && ! $item->{'url'};
-
+  next if ( $menu_skipblanks && $item->{'title'} =~ /^\s*$/ )
+       || ( $menu_skipheadings && ! $item->{'url'} )
+       || $menu_disable{$item->{'title'}};
+  
   $OUT .= '<TR><TD'; 
   if ( $menu_body_image ) {
     if ( exists $item->{'url'} && $action eq $item->{'url'} ) {

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

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm                       |    1 +
 FS/FS/Conf.pm                                      |   25 ++++++++++++++++++++
 .../FS-SelfService/cgi/myaccount_menu.html         |    8 ++++--
 3 files changed, 31 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list