summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/view
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-08-17 16:11:27 +0200
committerGitHub <noreply@github.com>2018-08-17 16:11:27 +0200
commit6fa126755329c0d4c0d80c51f1b16ccf16c272e3 (patch)
treed7240193be77b6cfe433200033da11b1e4706d74 /modules/luci-mod-admin-full/luasrc/view
parent8c77975d1bfc9f79580b83f5b5e591b8b4cae67f (diff)
parent89486bd66f828e272a1456b0ccd6e18617ae5ff0 (diff)
Merge pull request #2075 from dibdot/force_update
luci-mod-admin-full: allow forced upgrade (revised)
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm25
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm14
2 files changed, 27 insertions, 12 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
index ee9c2f8fd3..f3d2e8d7b0 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
@@ -20,7 +20,7 @@
<form class="inline" method="post" action="<%=url('admin/system/flashops/backup')%>">
<input type="hidden" name="token" value="<%=token%>" />
<div class="cbi-value<% if not reset_avail then %> cbi-value-last<% end %>">
- <label class="cbi-value-title" for="image"><%:Download backup%>:</label>
+ <label class="cbi-value-title" for="image"><%:Download backup%></label>
<div class="cbi-value-field">
<input class="cbi-button cbi-button-action important" type="submit" name="backup" value="<%:Generate archive%>" />
</div>
@@ -35,7 +35,7 @@
<form class="inline" method="post" action="<%=url('admin/system/flashops/reset')%>">
<input type="hidden" name="token" value="<%=token%>" />
<div class="cbi-value cbi-value-last">
- <label class="cbi-value-title"><%:Reset to defaults%>:</label>
+ <label class="cbi-value-title"><%:Reset to defaults%></label>
<div class="cbi-value-field">
<input onclick="return confirm('<%:Really reset all changes?%>')" class="cbi-button cbi-button-reset" type="submit" name="reset" value="<%:Perform reset%>" />
</div>
@@ -44,7 +44,7 @@
<% end %>
<form class="inline" method="post" action="<%=url('admin/system/flashops/restore')%>" enctype="multipart/form-data">
<div class="cbi-value cbi-value-last">
- <label class="cbi-value-title" for="archive"><%:Restore backup%>:</label>
+ <label class="cbi-value-title" for="archive"><%:Restore backup%></label>
<div class="cbi-value-field">
<input type="hidden" name="token" value="<%=token%>" />
<input type="file" name="archive" id="archive" />
@@ -69,22 +69,31 @@
<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 a compatible firmware image).%></div>
<div class="cbi-section-node">
<div class="cbi-value">
- <label class="cbi-value-title" for="keep"><%:Keep settings%>:</label>
+ <label class="cbi-value-title" for="keep"><%:Keep settings%></label>
<div class="cbi-value-field">
<input type="checkbox" name="keep" id="keep" checked="checked" />
</div>
</div>
+ <% if image_invalid then %>
+ <div class="cbi-value">
+ <label class="cbi-value-title" for="force"><%:Force upgrade%></label>
+ <div class="cbi-value-field">
+ <input type="checkbox" name="force" id="force" />
+ </div>
+ <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. %>
+ <%:Select 'Force upgrade' to flash the image even if the image format check fails. Use only if you are sure that the firmware is correct and meant for your device! %>
+ </div>
+ </div>
+ <% end %>
<div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>">
- <label class="cbi-value-title" for="image"><%:Image%>:</label>
+ <label class="cbi-value-title" for="image"><%:Image%></label>
<div class="cbi-value-field">
<input type="file" name="image" id="image" />
<input type="submit" class="cbi-button cbi-button-action important" value="<%:Flash image...%>" />
</div>
</div>
</div>
- <% if image_invalid then %>
- <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>
- <% end %>
</form>
<% else %>
<div class="cbi-section-descr"><%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the wiki for device specific install instructions.%></div>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
index 7175248dbb..597ddfd6bf 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
@@ -22,7 +22,7 @@
</p>
-<fieldset class="cbi-section">
+<div class="cbi-section">
<ul>
<li><%:Checksum%><br />
<%:MD5%>: <code><%=checksum%></code><br />
@@ -39,18 +39,24 @@
end
%></li>
<li><% if keep then %>
- <%:Configuration files will be kept.%>
+ <%:Configuration files will be kept%>
<% else %>
- <%:Note: Configuration files will be erased.%>
+ <%:Caution: Configuration files will be erased%>
<% end %></li>
+ <% if force then %>
+ <li>
+ <%:Caution: System upgrade will be forced%>
+ </li>
+ <% end %>
</ul>
-</fieldset>
+</div>
<div class="cbi-page-actions right">
<form class="inline" action="<%=REQUEST_URI%>" method="post">
<input type="hidden" name="token" value="<%=token%>" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="keep" value="<%=keep and "1" or ""%>" />
+ <input type="hidden" name="force" value="<%=force and "1" or ""%>" />
<input class="cbi-button cbi-button-reset" name="cancel" type="submit" value="<%:Cancel%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Proceed%>" />
</form>