bc8bcf4884a76d27f5f6323993e64225000acb0c
[project/luci.git] / modules / luci-mod-admin-full / luasrc / view / admin_system / flashops.htm
1 <%#
2 Copyright 2008 Steven Barth <steven@midlink.org>
3 Copyright 2008 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 operations%></h2>
10
11 <ul class="cbi-tabmenu">
12 <li class="cbi-tab"><a href="#"><%:Actions%></a></li>
13 <li class="cbi-tab-disabled"><a href="<%=REQUEST_URI%>/backupfiles"><%:Configuration%></a></li>
14 </ul>
15
16 <fieldset class="cbi-section">
17
18 <fieldset class="cbi-section">
19 <legend><%:Backup / Restore%></legend>
20 <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
21 <div class="cbi-section-descr"><%:Click "Generate archive" to download a tar archive of the current configuration files. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%></div>
22 <div class="cbi-section-node">
23 <div class="cbi-value<% if not reset_avail then %> cbi-value-last<% end %>">
24 <label class="cbi-value-title" for="image"><%:Download backup%>:</label>
25 <div class="cbi-value-field">
26 <input class="cbi-button cbi-button-apply" type="submit" name="backup" value="<%:Generate archive%>" />
27 </div>
28 </div>
29 <% if reset_avail then %>
30 <div class="cbi-value cbi-value-last">
31 <label class="cbi-value-title"><%:Reset to defaults%>:</label>
32 <div class="cbi-value-field">
33 <input onclick="return confirm('<%:Really reset all changes?%>')" class="cbi-button cbi-button-reset" type="submit" name="reset" value="<%:Perform reset%>" />
34 </div>
35 </div>
36 <% end %>
37 </div>
38 <br />
39 <div class="cbi-section-descr"><%:To restore configuration files, you can upload a previously generated backup archive here.%></div>
40 <div class="cbi-section-node">
41 <div class="cbi-value cbi-value-last">
42 <label class="cbi-value-title" for="archive"><%:Restore backup%>:</label>
43 <div class="cbi-value-field">
44 <input type="file" name="archive" id="archive" />
45 <input type="submit" class="cbi-button cbi-input-apply" name="restore" value="<%:Upload archive...%>" />
46 </div>
47 </div>
48 </div>
49 </form>
50 </fieldset>
51
52 <br />
53
54 <fieldset class="cbi-section">
55 <legend><%:Flash new firmware image%></legend>
56 <% if upgrade_avail then %>
57 <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
58 <div class="cbi-section-descr"><%:Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires an OpenWrt compatible firmware image).%></div>
59 <div class="cbi-section-node">
60 <div class="cbi-value">
61 <label class="cbi-value-title" for="keep"><%:Keep settings%>:</label>
62 <div class="cbi-value-field">
63 <input type="checkbox" name="keep" id="keep" checked="checked" />
64 </div>
65 </div>
66 <div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>">
67 <label class="cbi-value-title" for="image"><%:Image%>:</label>
68 <div class="cbi-value-field">
69 <input type="file" name="image" id="image" />
70 <input type="submit" class="cbi-button cbi-input-apply" value="<%:Flash image...%>" />
71 </div>
72 </div>
73 </div>
74 <% if image_invalid then %>
75 <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>
76 <% end %>
77 </form>
78 <% else %>
79 <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>
80 <% end %>
81 </fieldset>
82
83 </fieldset>
84
85 <%+footer%>