modules/admin-full, modules/admin-mini: Fixed firmware upgrade templates
[project/luci.git] / modules / admin-full / luasrc / view / admin_system / upgrade.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <h1><%:system%></h1>
17 <h2><%:a_s_flash%></h2>
18 <p><%:a_s_flash_upgrade1%></p>
19 <br />
20 <% if sysupgrade and not ret then %>
21 <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
22         <div class="left"><%:a_s_flash_fwimage%>:</div>
23         <div>
24                 <input type="file" size="30" name="image" />
25                 <br />
26                 <br />
27                 <input type="checkbox" name="keepcfg" value="1" checked="checked" />
28                 <span class="bold"><%:a_s_flash_keepcfg%></span>
29         </div>
30         <div>
31                 <input type="submit" value="<%:a_s_flash_fwupgrade%>" />
32         </div>
33 </form>
34 <% elseif ret then %>
35         <% if ret == 0 then %>
36 <div class="ok"><%:a_s_flash_flashed%></div>
37         <% else %>
38 <div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div>  
39         <% end %>
40 <% else %>
41 <div class="error"><%:a_s_flash_notimplemented%></div>
42 <% end %>
43 <%+footer%>