luci-mod-admin-full: tweak checksum item presentation
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_system / upgrade.htm
1 <%#
2 Copyright 2008 Steven Barth <steven@midlink.org>
3 Copyright 2008-2009 Jo-Philipp Wich <jow@openwrt.org>
4 Licensed to the public under the Apache License 2.0.
5 -%>
6
7 <%+header%>
8
9 <h2 name="content"><%:Flash Firmware%> - <%:Verify%></h2>
10 <p>
11 <%_ The flash image was uploaded.
12 Below is the checksum and file size listed,
13 compare them with the original file to ensure data integrity.<br />
14 Click "Proceed" below to start the flash procedure. %>
15
16 <% if storage > 0 and size > storage then %>
17 <br /><br />
18 <div class="error"><%:It appears that you are trying to
19 flash an image that does not fit into the flash memory, please verify
20 the image file! %></div>
21 <% end %>
22
23 </p>
24
25 <fieldset class="cbi-section">
26 <ul>
27 <li><%:Checksum%><br />
28 <%:MD5%>: <code><%=checksum%></code><br />
29 <%:SHA256%>: <code><%=sha256ch%></code></li>
30 <li><%:Size%>: <%
31 local w = require "luci.tools.webadmin"
32 write(w.byte_format(size))
33
34 if storage > 0 then
35 write(luci.i18n.translatef(
36 " (%s available)",
37 w.byte_format(storage)
38 ))
39 end
40 %></li>
41 <li><% if keep then %>
42 <%:Configuration files will be kept.%>
43 <% else %>
44 <%:Note: Configuration files will be erased.%>
45 <% end %></li>
46 </ul>
47 </fieldset>
48
49 <div class="cbi-page-actions right">
50 <form class="inline" action="<%=REQUEST_URI%>" method="post">
51 <input type="hidden" name="token" value="<%=token%>" />
52 <input type="hidden" name="step" value="2" />
53 <input type="hidden" name="keep" value="<%=keep and "1" or ""%>" />
54 <input class="cbi-button cbi-button-reset" name="cancel" type="submit" value="<%:Cancel%>" />
55 <input class="cbi-button cbi-button-apply" type="submit" value="<%:Proceed%>" />
56 </form>
57 </div>
58
59 <%+footer%>