<& /elements/header.html, mt('Preferences for [_1]', $FS::CurrentUser::CurrentUser->username) &>
+% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } };
+
<FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html">
<& /elements/error.html &>
% if ( FS::Auth->auth_class->can('change_password') ) {
- <% emt('Change password (leave blank for no change)') %>
- <% ntable("#cccccc",2) %>
+ <FONT CLASS="fsinnerbox-title"><% emt('Change password (leave blank for no change)') %></FONT>
+ <TABLE CLASS="fsinnerbox">
<TR>
<TH ALIGN="right"><% emt("Current password:") %> </TH>
</TABLE>
<BR>
+ <FONT CLASS="fsinnerbox-title"><% emt('Google Authenticator') %></FONT>
+ <TABLE CLASS="fsinnerbox">
+ <TR>
+% if ( $curuser->totp_secret32 ) {
+ <TD><IMG SRC="<% $curuser->totp_qr_code_url %>"</IMG></TD>
+% } else {
+ <TD><A HREF="<%$p%>pref/set_totp_secret32.html">Enable</A></TD>
+% }
+ </TR>
+ </TABLE>
+ <BR>
+
% }
-<% emt("Interface") %>
-<% ntable("#cccccc",2) %>
+<FONT CLASS="fsinnerbox-title"><% emt("Interface") %></FONT>
+<TABLE CLASS="fsinnerbox">
<TR>
<TH ALIGN="right"><% emt("Locale:") %> </TH>
</TR>
<TR>
- <TH ALIGN="right"><% emt("Menu location:") %> </TH>
+ <TH ALIGN="right" STYLE="vertical-align:top"><% emt("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' : ''%>> <% emt("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' : ''%>> <% emt("Top") %> <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' : ''%>> <% emt("Top") %> <BR>
</TD>
<TD><IMG NAME="menu_example" SRC="../images/menu-<% $menu_position %>-example.png"></TD>
</TR>
</TR>
<TR>
- <TH ALIGN="right"><% emt("Scale documents to fit on a letter-size page") %></TH>
+ <TH ALIGN="right"><% emt("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>
</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"><% emt("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>
+ <INPUT TYPE="text" ID="<% $validate_field_cve %>" NAME="<% $validate_field_cve %>" VALUE="<% $curuser->option('customer_view_emails') %>"></TD>
</TD>
</TR>
<BR>
-<% emt("Email Address") %>
-<% ntable("#cccccc",2) %>
+<FONT CLASS="fsinnerbox-title"><% emt("Email Address") %></FONT>
+<TABLE CLASS="fsinnerbox">
<TR>
<TH><% emt("Email Address(es) (comma separated) ") %></TH>
<BR>
-<% emt("Development") %>
-<% ntable("#cccccc",2) %>
+<FONT CLASS="fsinnerbox-title"><% emt("Development") %></FONT>
+<TABLE CLASS="fsinnerbox">
<TR>
<TH><% emt("Show customer package timestamps:") %> </TH>
<INPUT TYPE="submit" VALUE="<% emt("Update preferences") %>">
-<&/elements/footer.html &>
+% my %footerdata = (
+% 'formvalidation' => $js_form_validate,
+% );
+<% include("/elements/footer.html", %footerdata) %>
+
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;