summaryrefslogtreecommitdiff
path: root/html/app/views/user/login.php
blob: dbfb2e565870a87354ffd07ba94a6f25203f84bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
  <title><?=SITE_TITLE?> - Είσοδος Χρήστη</title>

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400&display=swap" rel="stylesheet">

  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">

  <link href="/assets/css/overides.css" rel="stylesheet">

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.bundle.min.js" integrity="sha384-qKXV1j0HvMUeCBQ+QVp7JcfGl760yU08IQ+GpUo5hlbpg51QRiuqHAJz8+BrxE/N" crossorigin="anonymous"></script>

  <style>
  html,body{
    padding:0; margin:0;
    font-size:1.25em;
    color: #037; background: #eee;
    line-height:1.2em; 
  }
  h3 {
    font-size: 2em; font-style: normal;
    font-weight: 400;
    color: #05a;
    margin: 0; padding: 5px;
    opacity: 0.27;
    border-bottom: 1px solid #05a;
  }
  .container { display: flex; height: 100vh; align-items:center; }
  .content { position: relative;
      max-width:480px; width: 100%;
      margin: auto auto; padding: 1.5em;
      justify-center: center;
      background: #ddd;
      border-radius: 8px;
      box-shadow: 1px 5px 7px #7777;
  }
  </style>
</head>
<body class="classroom">
  <div class='container'>
    <div class='content'>
        <h4>Είσοδος Χρήστη</h4>
        <hr />
        <form method="post" action="/login-check">
            <div class="mb-3">
                <label for="exampleInputEmail1" class="form-label">Email</label>
                <input type="email" class="form-control form-control-sm" name="email" aria-describedby="emailHelp" required>
            </div>
            <div class="mb-3">
                <label for="exampleInputPassword1" class="form-label">Κωδικός Πρόσβασης</label>
                <input type="password" class="form-control form-control-sm" name="password" required>
            </div>
            <br />
            <button type="submit" class="btn btn-primary btn-sm col-12">Επιβεβαίωση και Είσοδος</button>
        </form>
    </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>