diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-26 13:56:08 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-26 13:56:08 +0200 |
| commit | 99fa6ef9b19dc81f10b582ca6749bf1c8cf32c44 (patch) | |
| tree | 9c5451e2c516e96ada413a6aa4f3f22e49817d8a /Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account | |
| parent | bbd04cf9e88d147225cc4b0d782fec31cfe21b6e (diff) | |
| download | Tango-99fa6ef9b19dc81f10b582ca6749bf1c8cf32c44.tar.gz Tango-99fa6ef9b19dc81f10b582ca6749bf1c8cf32c44.zip | |
Working on machine service downloads site.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account/Login.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account/Login.js b/Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account/Login.js new file mode 100644 index 000000000..fbb21c935 --- /dev/null +++ b/Software/Visual_Studio/Web/Tango.MachineService/Scripts/Account/Login.js @@ -0,0 +1,43 @@ +$(document).ready(function () { + + var state = false; + + //$("input:text:visible:first").focus(); + + $('#accesspanel').on('submit', function (e) { + + e.preventDefault(); + + state = !state; + + document.getElementById("litheader").className = "poweron"; + document.getElementById("go").className = ""; + document.getElementById("go").value = "Initializing..."; + + $.ajax({ + type: "POST", + url: "Login", + // The key needs to match your method's input parameter (case-sensitive). + data: JSON.stringify({ Email: $("#email").val(), Password: $("#password").val() }), + contentType: "application/json; charset=utf-8", + success: function (data) { + window.location.href = "/Downloads/index"; + }, + error: function (errMsg) { + document.getElementById("litheader").className = ""; + document.getElementById("go").className = "denied"; + document.getElementById("go").value = "Access Denied"; + + setTimeout(function () { + + document.getElementById("litheader").className = ""; + document.getElementById("go").className = ""; + document.getElementById("go").value = "Authorize"; + + }, 1500); + }, + }); + + }); + +});
\ No newline at end of file |
