summaryrefslogtreecommitdiff
path: root/httemplate/pref/pref.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/pref/pref.html')
-rw-r--r--httemplate/pref/pref.html32
1 files changed, 30 insertions, 2 deletions
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 57e22b3..562ef29 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -31,7 +31,7 @@ Interface
<% ntable("#cccccc",2) %>
<TR>
- <TH>Menu location: </TH>
+ <TH ALIGN="right">Menu location: </TH>
<TD>
<INPUT TYPE="radio" NAME="menu_position" VALUE="left" onClick="document.images['menu_example'].src='../images/menu-left-example.png';" <% $menu_position eq 'left' ? ' CHECKED' : ''%>> Left<BR>
<INPUT TYPE="radio" NAME="menu_position" VALUE="top"onClick="document.images['menu_example'].src='../images/menu-top-example.png';" <% $menu_position eq 'top' ? ' CHECKED' : ''%>> Top <BR>
@@ -39,6 +39,21 @@ Interface
<TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
</TR>
+ <TR>
+ <TH ALIGN="right">Default customer view: </TD>
+ <TD COLSPAN=2>
+ <SELECT NAME="default_customer_view">
+% foreach my $view ( keys %customer_views ) {
+% my $selected =
+% $customer_views{$view} eq $curuser->option('default_customer_view')
+% ? 'SELECTED'
+% : '';
+ <OPTION VALUE="<%$customer_views{$view}%>" <%$selected%>><%$view%></OPTION>
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
</TABLE>
<BR>
@@ -113,8 +128,21 @@ Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>
my $curuser = $FS::CurrentUser::CurrentUser;
+#false laziness w/view/cust_main.cgi and Conf.pm (cust_main-default_view)
+
+tie my %customer_views, 'Tie::IxHash',
+ 'Basics' => 'basics',
+ 'Notes' => 'notes', #notes and files?
+ 'Tickets' => 'tickets',
+ 'Packages' => 'packages',
+ 'Payment History' => 'payment_history',
+;
+$customer_views{'Change History'} = 'change_history'
+ if $curuser->access_right('View customer history');
+$customer_views{'Jumbo'} = 'jumbo';
+
# XSS via your own preferences? seems unlikely, but nice try anyway...
-( $curuser->option('menu_position') || 'left' )
+( $curuser->option('menu_position') || 'top' )
=~ /^(\w+)$/ or die "illegal menu_position";
my $menu_position = $1;
( $curuser->option('email_address') )