optionally scale to the page width when printing, #71301
[freeside.git] / httemplate / pref / pref.html
index 9537fed..c6bcf6f 100644 (file)
@@ -1,31 +1,33 @@
-<% include('/elements/header.html', 'Preferences for '. getotaker ) %>
+<% include('/elements/header.html', 'Preferences for '. $FS::CurrentUser::CurrentUser->username ) %>
 
 <FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
 
 <% include('/elements/error.html') %>
 
+% if ( FS::Auth->auth_class->can('change_password') ) {
 
-<% mt('Change password (leave blank for no change)') |h %>
-<% ntable("#cccccc",2) %>
+    <% mt('Change password (leave blank for no change)') |h %>
+    <% ntable("#cccccc",2) %>
 
-  <TR>
-    <TH ALIGN="right">Current password: </TH>
-    <TD><INPUT TYPE="password" NAME="_password"></TD>
-  </TR>
+      <TR>
+        <TH ALIGN="right">Current password: </TH>
+        <TD><INPUT TYPE="password" NAME="_password"></TD>
+      </TR>
 
-  <TR>
-    <TH ALIGN="right">New password: </TH>
-    <TD><INPUT TYPE="password" NAME="new_password"></TD>
-  </TR>
+      <TR>
+        <TH ALIGN="right">New password: </TH>
+        <TD><INPUT TYPE="password" NAME="new_password"></TD>
+      </TR>
 
-  <TR>
-   <TH ALIGN="right">Re-enter new password: </TH>
-   <TD><INPUT TYPE="password" NAME="new_password2"></TD>
-  </TR>
+      <TR>
+       <TH ALIGN="right">Re-enter new password: </TH>
+       <TD><INPUT TYPE="password" NAME="new_password2"></TD>
+      </TR>
 
-</TABLE>
-<BR>
+    </TABLE>
+    <BR>
 
+% }
 
 Interface
 <% ntable("#cccccc",2) %>
@@ -75,6 +77,21 @@ Interface
       </SELECT>
     </TD>
   </TR>
+
+% my $history_order = $curuser->option('history_order') || 'oldest';
+  <TR>
+    <TH ALIGN="right">Customer history sort order: </TH>
+    <TD COLSPAN=2>
+      <& /elements/select.html,
+        field       => 'history_order',
+        curr_value  => $history_order,
+        options     => [ 'oldest', 'newest' ],
+        labels      => { 'oldest' => 'Oldest first',
+                         'newest' => 'Newest first',
+                       },
+      &>
+    </TD>
+  </TR>
   
   <TR>
     <TH ALIGN="right">Spreadsheet download format: </TH>
@@ -91,13 +108,6 @@ Interface
     </TD>
   </TR>
 
- <TR>
-    <TH ALIGN="right" COLSPAN=1>Enable approximate customer searching even when an exact match is found: </TH>
-    <TD ALIGN="left" COLSPAN=2>
-      <INPUT TYPE="checkbox" NAME="enable_fuzzy_on_exact" VALUE="1" <% $curuser->option('enable_fuzzy_on_exact') ? 'CHECKED' : '' %>>
-    </TD>
-  </TR>
-
   <TR>
     <TH ALIGN="right" COLSPAN=1>Disable HTML editor for customer notes: </TH>
     <TD ALIGN="left" COLSPAN=2>
@@ -112,6 +122,34 @@ Interface
     </TD>
   </TR>
 
+  <TR>
+    <TH ALIGN="right">Don't copy MAC address delimiters to clipboard</TH>
+    <TD ALIGN="left" COLSPAN=2>
+      <INPUT TYPE="checkbox" NAME="enable_mask_clipboard_hack" VALUE="1" <% $curuser->option('enable_mask_clipboard_hack') ? 'CHECKED' : '' %>>
+    </TD>
+  </TR>
+
+  <TR>
+    <TH ALIGN="right">Scale documents to fit on a letter-size page</TH>
+    <TD ALIGN="left">
+      <INPUT TYPE="checkbox" NAME="printtofit" VALUE="Y" <% $curuser->option('printtofit') ? 'CHECKED' : '' %>>
+    </TD>
+  </TR>
+
+  <TR>
+    <TH ALIGN="right">How many recently-modified customers displayed on dashboard</TH>
+    <TD ALIGN="left" COLSPAN=2>
+      <INPUT TYPE="text" NAME="dashboard_customers" VALUE="<% $curuser->option('dashboard_customers') %>"></TD>
+    </TD>
+  </TR>
+
+  <TR>
+    <TH ALIGN="right">How many recent outbound emails to show in customer view</TH>
+    <TD ALIGN="left" COLSPAN=2>
+      <INPUT TYPE="text" NAME="customer_view_emails" VALUE="<% $curuser->option('customer_view_emails') %>"></TD>
+    </TD>
+  </TR>
+
 </TABLE>
 <BR>
 
@@ -165,6 +203,8 @@ Development
 </TABLE>
 <BR>
 
+% if ( $curuser->access_right('Employee preference telephony integration') ) {
+
 SNOM integration
 <% ntable("#cccccc",2) %>
 
@@ -209,6 +249,7 @@ Vonage integration (see <a href="https://secure.click2callu.com/">Click2Call</a>
 </TABLE>
 <BR>
 
+% }
 
 % foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
   <INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
@@ -230,19 +271,20 @@ tie my %customer_views, 'Tie::IxHash',
   'Basics'          => 'basics',
   'Notes'           => 'notes', #notes and files?
   'Tickets'         => 'tickets',
+  'Appointments'    => 'appointments',
+  'Quotations'      => 'quotations',
   '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') || 'top' )
   =~ /^(\w+)$/ or die "illegal menu_position";
 my $menu_position = $1;
 ( $curuser->option('email_address') )
-  =~ /^([,\w\@.]*)$/ or die "illegal email_address";  #too late
+  =~ /^([,\w\@.\-]*)$/ or die "illegal email_address";  #too late
 my $email_address = $1;
 
 </%init>