Browse Source

Progress bar

Julien Vaubourg 9 years ago
parent
commit
79b6d654ae
1 changed files with 16 additions and 16 deletions
  1. 16 16
      olinux/script/initramfs/www/index.html

+ 16 - 16
olinux/script/initramfs/www/index.html

@@ -214,22 +214,22 @@
     function submitForm() {
       showLoader();
 
-      //var xmlHttp = new XMLHttpRequest();
-      //xmlHttp.open('POST', document.getElementById('form').action, true);
-
-      //xmlHttp.onreadystatechange = function() {
-      //  if(xmlHttp.readyState == 4) {
-      //    if(xmlHttp.responseText.match(/TPL:UNLOCKED/)) {
-      //      hideLoader();
-      //      failed();
-
-      //    } else {
-      //      unlocked();
-      //    }
-      //  }
-      //}
-
-      //xmlHttp.send('passphrase=' + document.getElementById('passphrase').value);
+      var xmlHttp = new XMLHttpRequest();
+      xmlHttp.open('POST', document.getElementById('form').action, true);
+
+      xmlHttp.onreadystatechange = function() {
+        if(xmlHttp.readyState == 4) {
+          if(xmlHttp.responseText.match(/TPL:UNLOCKED/)) {
+            hideLoader();
+            failed();
+
+          } else {
+            unlocked();
+          }
+        }
+      }
+
+      xmlHttp.send('passphrase=' + document.getElementById('passphrase').value);
 
       return false;
     }