<% include('/elements/header.html', 'Preferences for '. getotaker ) %>
+% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } };
+
<FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
<% include('/elements/error.html') %>
</TD>
</TR>
- <TR>
- <TH ALIGN="right">Hide package changes: </TH>
- <TD COLSPAN=2>
- <& /elements/select.html,
- field => 'hide_package_changes',
- options => [ '', 'location', 'all' ],
- labels => { '' => 'never',
- 'location' => 'location changes',
- 'all' => 'all package changes',
- },
- curr_value => ($cgi->param('hide_package_changes')
- || $curuser->option('hide_package_changes')),
- &>
- </TD>
- </TR>
-
% my $history_order = $curuser->option('history_order') || 'oldest';
<TR>
<TH ALIGN="right">Customer history sort order: </TH>
</TR>
<TR>
- <TH ALIGN="right">How many recently-modified customers displayed on dashboard</TH>
+ <TH ALIGN="right">When printing, scale HTML 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"><% emt("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>
+% my $validate_field_cve = 'customer_view_emails';
+% $js_form_validate->{pref_form}->{validate_fields}{$validate_field_cve} = 'digits: true';
+% $js_form_validate->{pref_form}->{error_message}{$validate_field_cve} = 'Please only enter numbers here.';
+
+ <TR>
+ <TH ALIGN="right">How many recent outbound emails to show in customer view</TH>
+ <TD ALIGN="left" COLSPAN=2>
+ <INPUT TYPE="text" ID="<% $validate_field_cve %>" NAME="<% $validate_field_cve %>" VALUE="<% $curuser->option('customer_view_emails') %>"></TD>
+ </TD>
+ </TR>
+
</TABLE>
<BR>
<% ntable("#cccccc",2) %>
<TR>
- <TH>Email Address(es) (comma separated) </TH>
+ <TH><% emt("Email Address(es) (comma separated) ") %></TH>
<TD>
<TD><INPUT TYPE="text" NAME="email_address" VALUE="<% $email_address %>">
</TD>
</TABLE>
<BR>
+% if ( $curuser->access_right('Employee preference telephony integration') ) {
+
SNOM integration
<% ntable("#cccccc",2) %>
</TABLE>
<BR>
+% }
% foreach my $prop (qw( height width availHeight availWidth colorDepth )) {
<INPUT TYPE="hidden" NAME="<% $prop %>" VALUE="">
<INPUT TYPE="submit" VALUE="Update preferences">
-<% include('/elements/footer.html') %>
+% my %footerdata = (
+% 'formvalidation' => $js_form_validate,
+% );
+<% include("/elements/footer.html", %footerdata) %>
+
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;