Commit a2ab5a9f authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

keep settings checkbox

parent bc8e3690
...@@ -251,12 +251,15 @@ switch($cmd){ ...@@ -251,12 +251,15 @@ switch($cmd){
$flash_list = verify(false); $flash_list = verify(false);
backup(); backup();
nandflash($flash_list); nandflash($flash_list);
copy_backup(); if (isset($_GET['restore'])) copy_backup();
break; break;
case "backup": case "backup":
backup(); backup();
send_backup(); send_backup();
break; break;
case "restore":
copy_backup();
break;
case "remove": case "remove":
remove(); remove();
break; break;
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<span id='btn_flash' class="btn btn-danger"><b>Flash</b></span> <span id='btn_flash' class="btn btn-danger"><b>Flash</b></span>
<span style='padding-left:10px;'><a href='var/flash.log'>flash.log</a></span> <span style='padding-left:10px;'><a href='var/flash.log'>flash.log</a></span>
</div> </div>
<div style='padding-left:10px;'>
<span>Keep old settings:</span> <input type='checkbox' id='chk_restore' style='width:20px;height:20px;position:relative;top:3px;' checked >
</div>
<div style='padding:10px;'> <div style='padding:10px;'>
<div id='status' class='blink'></div> <div id='status' class='blink'></div>
</div> </div>
......
...@@ -67,10 +67,14 @@ function init(){ ...@@ -67,10 +67,14 @@ function init(){
}); });
$('#btn_flash').click(function(){ $('#btn_flash').click(function(){
var restore = "";
if ($("#chk_restore").prop("checked")) restore="&restore";
$("#status").html("Flashing..."); $("#status").html("Flashing...");
blink_intvl = setInterval(blink,1000); blink_intvl = setInterval(blink,1000);
$.ajax({ $.ajax({
url: "update_nand.php?cmd=flash", url: "update_nand.php?cmd=flash"+restore,
success: function(result){ success: function(result){
clearInterval(blink_intvl); clearInterval(blink_intvl);
$("#status").html(result); $("#status").html(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment