+% my $history_order = $curuser->option('history_order') || 'oldest';
+ <TR>
+ <TH ALIGN="right"><% emt("Customer history sort order:") %> </TH>
+ <TD COLSPAN=2>
+ <& /elements/select.html,
+ field => 'history_order',
+ curr_value => $history_order,
+ options => [ 'oldest', 'newest' ],
+ labels => { 'oldest' => mt('Oldest first'),
+ 'newest' => mt('Newest first'),
+ },
+ &>
+ </TD>
+ </TR>
+
+ <TR>
+ <TH ALIGN="right"><% emt("Spreadsheet download format:") %> </TH>
+ <TD COLSPAN=2>
+ <SELECT NAME="spreadsheet_format">
+% my $xls = $curuser->option('spreadsheet_format') eq 'XLS';
+% my $xlsx = $curuser->option('spreadsheet_format') eq 'XLSX';
+ <OPTION VALUE=""></OPTION>
+ <OPTION VALUE="XLS"<% $xls ? 'SELECTED' : '' %>>XLS (Excel 97/2000/XP)
+ </OPTION>
+ <OPTION VALUE="XLSX"<% $xlsx ? 'SELECTED' : ''%>>XLSX (Excel 2007+)
+ </OPTION>
+ </SELECT>
+ </TD>
+ </TR>