upgrade_confirm.htm 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <%#
  2. LuCI - Lua Configuration Interface
  3. Copyright 2008 Steven Barth <steven@midlink.org>
  4. Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. $Id$
  10. -%>
  11. <%+header%>
  12. <h2>Firmware aktualisieren</h2>
  13. <p>
  14. Die Firmwaredatei wurde übermittelt. Bitte vergleiche MD5-Checksumme
  15. und Dateigröße und klicke anschließend auf "Fortfahren".
  16. </p>
  17. <% if flashsize > 0 and filesize > flashsize then %>
  18. <p class="error">Die Firmware passt nicht in den Speicher des Gerätes.</p>
  19. <% end %>
  20. <p>
  21. <ul>
  22. <li>md5sum: <code><%=checksum%></code></li>
  23. <li>Größe: <%
  24. function byte_format(byte)
  25. local suff = {"B", "KB", "MB", "GB", "TB"}
  26. for i=1, 5 do
  27. if byte > 1024 and i < 5 then
  28. byte = byte / 1024
  29. else
  30. return string.format("%.2f %s", byte, suff[i])
  31. end
  32. end
  33. end
  34. write(byte_format(filesize))
  35. if flashsize > 0 then
  36. write(luci.i18n.translatef(
  37. " (%s available)",
  38. w.byte_format(flashsize)
  39. ))
  40. end
  41. %></li>
  42. </ul>
  43. </p>
  44. <div class="cbi-page-actions right">
  45. <form style="display:inline">
  46. <input type="hidden" name="step" value="3" />
  47. <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
  48. <input class="cbi-button cbi-button-apply" type="submit" value="Fortfahren" />
  49. </form>
  50. <form style="display:inline">
  51. <input type="hidden" name="step" value="1" />
  52. <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
  53. <input class="cbi-button cbi-button-reset" type="submit" value="Abbrechen" />
  54. </form>
  55. </div>
  56. <%+footer%>