summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/view
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-18 21:45:01 +0000
committerSteven Barth <steven@midlink.org>2008-09-18 21:45:01 +0000
commita54b1945c407b7fecaae8aac57fa3338eb11a3bc (patch)
tree0a00ccd8a3db725d2b1e5bfa6a54caa6459bcc82 /modules/admin-full/luasrc/view
parent8f5d0d6ff5a1cbb40eccce5eeb99d5249bab5159 (diff)
Revert mtdow
Diffstat (limited to 'modules/admin-full/luasrc/view')
-rw-r--r--modules/admin-full/luasrc/view/admin_system/upgrade.htm37
1 files changed, 14 insertions, 23 deletions
diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm
index 8fe658a427..a3d97d6497 100644
--- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm
+++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm
@@ -17,13 +17,12 @@ $Id$
<h2><%:a_s_flash%></h2>
<p><%:a_s_flash_upgrade1%></p>
<br />
-<% if next(blocks) and not next(flash) then %>
+<% if sysupgrade and not ret then %>
<form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
<div class="left"><%:a_s_flash_fwimage%>:</div>
<div>
- <% for name, v in pairs(blocks) do %>
- <%=name%>: <input type="file" size="30" name="<%=name%>" /><br />
- <% end %>
+ <input type="file" size="30" name="image" />
+ <br />
<br />
<% if keep_avail then -%>
<input type="checkbox" name="keepcfg" value="1" checked="checked" />
@@ -34,28 +33,20 @@ $Id$
<input type="submit" value="<%:a_s_flash_fwupgrade%>" />
</div>
</form>
-<% elseif next(flash) then %>
+<% elseif ret then %>
<p><%:a_s_flash_received%></p>
+ <p><%:a_s_flash_inprogress%></p>
- <% reboot.exec = false
- for i, entry in ipairs(flash) do
- local name, func = entry.name, entry.func %>
- <%:a_s_flash_inprogress%> <%=name%>...
- <%=string.rep(" ", 32*1024)%>
- <%
- local stat, code = func()
- reboot.exec = reboot.exec or stat
- if stat and code then %>
- <%:ok%><br />
- <% else %>
- <%:a_s_flash_flasherr%>! (<%:code%> <%=code%>)<br />
- <% end %>
- <% if reboot.exec then %>
- <br />
- <div><%:a_s_flash_flashed%></div>
- <% end %>
+<!-- <%=string.rep(" ", 2048)%> -->
+ <% %>
+ <% local ret = ret()
+ if ret == 0 then %>
+<div class="ok"><%:a_s_flash_flashed%></div>
+ <% else %>
+<div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div>
<% end %>
<% else %>
<div class="error"><%:a_s_flash_notimplemented%></div>
<% end %>
-<%+footer%> \ No newline at end of file
+<%+footer%>
+<% if ret == 0 then luci.sys.reboot() end %>