diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-08-13 15:57:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 15:57:39 +0200 |
commit | 5b8a7652af6877e668badd976f84d030832f1b88 (patch) | |
tree | cb18a6895166f14fa8250b7b473497c289edab32 | |
parent | 15cb504b446add1d62bb318c683ed2cf78cd7041 (diff) | |
parent | 6cc4a22579676862558e7a50d30de2395de7a71e (diff) |
Merge pull request #1295 from aparcar/keep_settings
luci-app-attendedsysupgrade: add keep-settings opt
-rw-r--r-- | applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm index 759949dbe5..9160674e58 100644 --- a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm +++ b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm @@ -6,6 +6,12 @@ </div> <input class="cbi-button" value="search for updates" onclick="update_request()" type="button" id="update_button"> <div style="display: none" id="packages" class="alert-message success"></div> +<div class="cbi-value" id="keep_container" style="display: none"> + <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> <script type="text/javascript"> @@ -217,6 +223,7 @@ function image_request_handler(response) { update_info("image created") document.getElementById("update_button").value = "sysupgrade" document.getElementById("update_button").onclick = function() {download_image(response_content.url); } + document.getElementById("keep_container").style.display = "block"; } } @@ -234,7 +241,8 @@ function upload_image(blob) { upload_request.addEventListener('load', function(event) { // this checksum should be parsed document.getElementById("update_info").innerHTML = "flashing... please wait" // show fancy indicator http://www.ajaxload.info/ - ubus_request("attendedsysupgrade", "sysupgrade", '{ }', 'done'); + + ubus_request("attendedsysupgrade", "sysupgrade", '{ "keep_settings": ' + document.getElementById("keep").checked + ' }', 'done'); }); upload_request.addEventListener('error', function(event) { |