diff --git a/public/assets/js/login.js b/public/assets/js/login.js index a3c36745..d47ae86b 100644 --- a/public/assets/js/login.js +++ b/public/assets/js/login.js @@ -1,8 +1,24 @@ jQuery(document).ready(function($){ - $('#login_form').submit(function(){ + $('#login_form').submit(function(event){ + if(!navigator.cookieEnabled){ + event.preventDefault(); + checkCookiesEnabled(); + return false; + } $('.btn-primary').attr('disabled', 'disabled'); return true; }); -}); \ No newline at end of file + checkCookiesEnabled(); +}); + +function checkCookiesEnabled(){ + var cookieEnabled = navigator.cookieEnabled; + + return cookieEnabled || showCookieFail(); +} + +function showCookieFail(){ + $('#cookies-disabled-dialog').show(); +} \ No newline at end of file diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 323d6b9a..5f91c570 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -15,6 +15,12 @@ @endif @endif + + +