finish up initial work on customer view tabs (ensure links back to customer view...
[freeside.git] / httemplate / pref / pref.html
index 44b8448..8bdf6c0 100644 (file)
@@ -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>
 
@@ -68,6 +83,10 @@ Development
     <TH>Show database profiling (when available): </TH>
     <TD><INPUT TYPE="checkbox" NAME="show_db_profile" VALUE="1" <% $curuser->option('show_db_profile') ? 'CHECKED' : '' %>></TD>
   </TR>
+  <TR>
+    <TH>Save database profiling logs (when available): </TH>
+    <TD><INPUT TYPE="checkbox" NAME="save_db_profile" VALUE="1" <% $curuser->option('save_db_profile') ? 'CHECKED' : '' %>></TD>
+  </TR>
 
 </TABLE>
 <BR>
@@ -105,12 +124,27 @@ Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>
 <INPUT TYPE="submit" VALUE="Update preferences">
 
 <% include('/elements/footer.html') %>
+<%once>
+
+  #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',
+    #'Change History'  => '',
+    'Jumbo'           => 'jumbo',
+  ;
+
+</%once>
 <%init>
 
 my $curuser = $FS::CurrentUser::CurrentUser;
 
 # 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') )