finish the import portion of excel rate edit, RT#5108
[freeside.git] / httemplate / misc / rate_edit_excel.html
1 <% include('/elements/header.html', 'Edit rates with Excel' ) %>
2
3 <% include( '/elements/form-file_upload.html',
4               'name'      => 'RateImportForm',
5               'action'    => 'process/rate_edit_excel.html',
6               'num_files' => 1,
7               'fields'    => [ 'format' ],
8               'message'   => 'Rate edit successful',
9               'url'       => $p."browse/rate_region.html",
10           )
11 %>
12
13 <% &ntable("#cccccc", 2) %>
14
15   <TR>
16     <TH ALIGN="left">1. Download current rates:</TH>
17     <TD>
18       <A HREF="<%$p%>/browse/rate_region.html?show_rates=1;_type=regions.xls">Download rate spreadsheet</A>
19     </TD>
20   </TR>
21
22   <TR>
23     <TH ALIGN="left" COLSPAN=2>2. Edit rates with Excel (or other .XLS-compatible application)</TH>
24   </TR>
25
26   <TR>
27     <TD ALIGN="left" COLSPAN=2>
28       &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;To add rates, add four columns like an existing rate, with headers starting with "NEW: Rate Name" or "Rate Name".<BR>
29      &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<FONT SIZE="-2"><I>For rate addition, protection can be turned off in Excel via the Tools-&gt;Protection-&gt;Unprotect Sheet menu command.  Note that only new rates can be added; modified grayed out cells will not be imported.</I></FONT>
30     </TD>
31   </TR>
32
33   <% include( '/elements/file-upload.html',
34                 'field' => 'file',
35                 'label' => '3. Upload edited rate file: ',
36                 'label_align' => 'left',
37             )
38   %>
39
40   <INPUT TYPE="hidden" NAME="format" VALUE="default">
41
42   <TR>
43     <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
44       <INPUT TYPE    = "submit"
45              ID      = "submit"
46              VALUE   = "Upload"
47              onClick = "document.RateImportForm.submit.disabled=true;"
48       >
49     </TD>
50   </TR>
51
52
53 </TABLE>
54
55 <% include('/elements/footer.html') %>
56 <%init>
57
58 die "access denied"
59   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
60
61 </%init>