diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 03:47:30 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 03:47:30 +0300 |
| commit | 059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch) | |
| tree | 7c21ac432f16dde2329a0d5954d70711eceb48e6 /public/app/views/user/login.php | |
| parent | 26cd8ee99659ef1926c96a049c93645ffc9b169d (diff) | |
| download | gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2 gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip | |
skeleton commit; based on an anom project
Diffstat (limited to 'public/app/views/user/login.php')
| -rw-r--r-- | public/app/views/user/login.php | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/public/app/views/user/login.php b/public/app/views/user/login.php new file mode 100644 index 0000000..1a59d43 --- /dev/null +++ b/public/app/views/user/login.php @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title><?=SITE_TITLE?> - Είσοδος Χρήστη</title> + + <?php // header includes + //////////////////////////////////////////////////////////////////////// + Render::view('components/header_includes'); + ?> + + <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"> + <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 ) { + if (data.status !== false) { + window.location.href = data.status.goto; + + } else { + alert('Wrong credentials; please try again'); + } + }); + + + }); +</script> + +</html> |
