3c8d11bb75b2baaab6a1cddfbd0a2a3c32285dce
[project/luci.git] / modules / luci-mod-failsafe / luasrc / view / failsafe / flashops.htm
1 <%#
2  Copyright 2008 Steven Barth <steven@midlink.org>
3  Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
4  Copyright 2012 Daniel Golle <dgolle@allnet.de>
5  Licensed to the public under the Apache License 2.0.
6 -%>
7
8 <%+header%>
9
10 <h2 name="content"><%:Flash operations%></h2>
11 <fieldset class="cbi-section">
12         <legend><%:Flash new firmware image%></legend>
13         <% if upgrade_avail then %>
14                 <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
15                         <div class="cbi-section-descr"><%:Upload a sysupgrade-compatible image. %></div>
16                         <div class="cbi-section-node">
17                                 <div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>">
18                                         <label class="cbi-value-title" for="image"><%:Image%>:</label>
19                                         <div class="cbi-value-field">
20                                                 <input type="file" name="image" id="image" />
21                                                 <input type="submit" class="cbi-button cbi-input-apply" value="<%:Flash image...%>" />
22                                         </div>
23                                 </div>
24                         </div>
25                         <% if image_invalid then %>
26                                 <div class="cbi-section-error"><%:The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. %></div>
27                         <% end %>
28                 </form>
29         <% else %>
30                 <div class="cbi-section-descr"><%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the OpenWrt wiki for device specific install instructions.%></div>
31         <% end %>
32 </fieldset>
33
34 <%+footer%>