summaryrefslogtreecommitdiff
path: root/html/app/views/user
diff options
context:
space:
mode:
Diffstat (limited to 'html/app/views/user')
-rw-r--r--html/app/views/user/login.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/html/app/views/user/login.php b/html/app/views/user/login.php
index 4451d52..dbfb2e5 100644
--- a/html/app/views/user/login.php
+++ b/html/app/views/user/login.php
@@ -60,4 +60,32 @@
</div>
</div>
</body>
+
+<script>
+ // When form is submited
+ // -------------------------------------------------------------------------
+
+ $('.content form').submit( event => {
+ event.preventDefault();
+
+
+ // prepare data to POST
+ var data = {
+ email: $('input[name=email]').val(),
+ password: $('input[name=password]').val()
+ };
+
+ // select action url (add or update)
+ var request = '/account/check-login';
+
+ // send POST request
+ $.post(request, data)
+ .done(function( data ) {
+ console.log(data);
+ });
+
+
+ });
+</script>
+
</html>