diff options
Diffstat (limited to 'public/app/views')
| -rw-r--r-- | public/app/views/components/menu.php | 2 | ||||
| -rw-r--r-- | public/app/views/js/submit/update-password.php | 61 | ||||
| -rw-r--r-- | public/app/views/js/submit/update-properties.php | 16 | ||||
| -rw-r--r-- | public/app/views/templates/admin_petitions.php | 135 | ||||
| -rw-r--r-- | public/app/views/user/new-password.php | 65 | ||||
| -rw-r--r-- | public/app/views/user/update_password.php | 73 | ||||
| -rw-r--r-- | public/app/views/user/update_properties.php | 7 | ||||
| -rw-r--r-- | public/app/views/xx--admin/admin-menu.php (renamed from public/app/views/admin/admin-menu.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/categories.php (renamed from public/app/views/admin/categories.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/edit_lesson.php (renamed from public/app/views/admin/edit_lesson.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/edit_page.php (renamed from public/app/views/admin/edit_page.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/files.php (renamed from public/app/views/admin/files.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/lessons.php (renamed from public/app/views/admin/lessons.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/pages.php (renamed from public/app/views/admin/pages.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/panel.php (renamed from public/app/views/admin/panel.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/privileges.php (renamed from public/app/views/admin/privileges.php) | 0 | ||||
| -rw-r--r-- | public/app/views/xx--admin/skeleton.php (renamed from public/app/views/admin/skeleton.php) | 0 |
17 files changed, 291 insertions, 68 deletions
diff --git a/public/app/views/components/menu.php b/public/app/views/components/menu.php index 3e1748d..30ed673 100644 --- a/public/app/views/components/menu.php +++ b/public/app/views/components/menu.php @@ -16,7 +16,7 @@ <li class="list-group-item separator">Προφίλ</li> <li class="list-group-item"><a href="/user/update_form">Ενημέρωση στοιχείων</a></li> - <li class="list-group-item"><a href="/user/change_password">Αλλαγή password</a></li> + <li class="list-group-item"><a href="/user/password_form">Αλλαγή password</a></li> <?php if ($is_admin) : ?> <li class="list-group-item separator">Διαχείριση</li> diff --git a/public/app/views/js/submit/update-password.php b/public/app/views/js/submit/update-password.php new file mode 100644 index 0000000..625d7cd --- /dev/null +++ b/public/app/views/js/submit/update-password.php @@ -0,0 +1,61 @@ +<script> + $(document).ready(function() { + + // When form is submited + //////////////////////////////////////////////////////////////////////////// + + $('form').submit( event => { + event.preventDefault(); + + if ($('input[name=password]').val() != $('input[name=confirm_password]').val()) { + alert('Τα δυο κωδικοί πρόσβασης δεν ταιριάζουν!'); + + } else if ($('input[name=password]').val() == "") { + alert('Ο κωδικός πρόσβασης δεν μπορεί να είναι κενός') + + } else if ( ($('input[name=password]').val() == '0') + || ($('input[name=password]').val() =='') ) { + alert('Παρκαλώ συμπληρώστε ένα τηλέφωνο επικοινωνίας') + + } else if ($('input[name=oldpass]').val() == "") { + alert('Παρκαλώ συμπληρώστε τον τρέχοντα κωδικό πρόβασης') + + } else { + + // prepare data to POST + var data = { + // identification fields + id: $('input[name=id]').val(), + // data fields + oldpass: $('input[name=oldpass]').val(), + password: $('input[name=password]').val(), + }; + console.log(data); + + var request = '/user/update/password'; // set action url + + // send POST request + $.post(request, data) + .done(function( data ) { + $('.office .content-form').html(`<h4>${data.title}<h4><br>${data.message}`) + }); + } + + }); + + + + // go-back event + //////////////////////////////////////////////////////////////////////////// + + $('.btn-back2panel').click( event => { + event.preventDefault(); + + let confirm_exit = confirm('<?=CONFIRM_EXIT?>'); + if (confirm_exit) { + window.location.href = '/panel'; + } + }); + + }); +</script>
\ No newline at end of file diff --git a/public/app/views/js/submit/update-properties.php b/public/app/views/js/submit/update-properties.php index 651ef3e..f793619 100644 --- a/public/app/views/js/submit/update-properties.php +++ b/public/app/views/js/submit/update-properties.php @@ -24,7 +24,7 @@ }; console.log(data); - var request = '/user/update_properties'; // set action url + var request = '/user/update/properties'; // set action url // send POST request $.post(request, data) @@ -34,5 +34,19 @@ }); + + + // go-back event + //////////////////////////////////////////////////////////////////////////// + + $('.btn-back2panel').click( event => { + event.preventDefault(); + + let confirm_exit = confirm('<?=CONFIRM_EXIT?>'); + if (confirm_exit) { + window.location.href = '/panel'; + } + }); + }); </script>
\ No newline at end of file diff --git a/public/app/views/templates/admin_petitions.php b/public/app/views/templates/admin_petitions.php new file mode 100644 index 0000000..59c85f6 --- /dev/null +++ b/public/app/views/templates/admin_petitions.php @@ -0,0 +1,135 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title><?=SITE_TITLE?> - Control Panel</title> + + <?php // header includes + //////////////////////////////////////////////////////////////////////// + Render::view('components/header_includes'); + ?> +<style> +:root { /* login-form overides */ + --form-content-font-size: 1rem; + --form-input-height: 34px; + --select2-arrow-top: 1px; +} +</style> +</head> +<body class="office central-form left-menu"> + + <div class='container'> + <div class='content row'> + + <div class="col-sm-12"> + +<div class="manage"> + <!-- title bar --> + <div class="title-bar"> + <div class="row"> + <h5 class="col-md-10">Διαχείριση Αιτήσεων και Δοικητικών Εγγράφων</h5> + <div class="col-md-2"> + <a type="button" class="btn btn-sm btn-back2panel pull-right" href="/panel"> + Επιστροφή + </a> + </div> + </div> + + </div> + + + <div class="row"> + <div class="col-md-12"> + + <div id="petitions"> + + <table id="dt-petitions" class="table table-responsive dt-table" style="width:100%"> + <thead> + <!--<th class="dt-id">α/α</th>--> + <th class="dt-subject">Θέμα</th> + <th class="dt-protocol">Αρ.Πρωτόκολλου</th> + <th class="dt-user">Χρήστης</th> + <!-- <th class="dt-signature">Signature</th> --> + <th class="dt-datepost">Ημερ. Καταχώρισης</th> + <th class="dt-actions"></th> + </thead> + </table> + + </div> + + </div> + </div> + +</div><!-- /manage --> + + </div> + + </div> + </div> + + + + + <!-- MODAL for set protocol number --> + <div class="modal fade" id="managePetition" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-lg" role="document"> + <div class="modal-content"> + + <form method="post" action=""> + + <div class="modal-header"> + <h4 class="modal-title" id="myModalLabel">Ενημέρωση αριθμού πρωτόκολλου</h4> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div><!-- /modal-header --> + + <!-- modal-body --> + <div class="modal-body"> + + <div class="row form-group"> + <label class="control-label col-sm-12" for="protocol">Αριθμός Πρψτοκόλλου</label> + <div class="col-sm-12"> + <input class="form-control form-control-sm" type="text" name="protocol" value="" required=""> + </div> + </div> + + <div class="row form-group"><!-- hiddens --> + <input type="hidden" name="id" value="0"><!-- petition-id --> + <input type="hidden" name="signature" value=""><!-- signature --> + </div> + + </div><!-- /modal body --> + + <div class="modal-footer"> + <div class="row form-actions" style="width: 50%;"> + + <div class="col-sm-4"> + <button type="button" class="btn btn-default js-modal-close col-12" data-bs-dismiss="modal">Κλείσιμο</button> + </div> + <div class="col-sm-8"> + <button class="btn btn-primary col-12" type="submit">Καταχώριση</button> + </div> + + </div> + </div><!-- /modal-footer --> + + </form><!-- /form --> + + </div> + </div> + </div> + + </body> + +<script src="/assets/js/panel/admin_petitions.js"></script> + + <!-- scripts + * handle show petition request + + if admin: + * modal + give protocol-number + --> +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> +</html> diff --git a/public/app/views/user/new-password.php b/public/app/views/user/new-password.php deleted file mode 100644 index 06e7fac..0000000 --- a/public/app/views/user/new-password.php +++ /dev/null @@ -1,65 +0,0 @@ -<!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"> - - <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="name" class="form-label">Κωδικός μίας χρήσης</label> - <input type="text" class="form-control form-control-sm" name="name" 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> - <div class="mb-3"> - <label for="exampleInputPassword2" class="form-label">Επιβεβαίωση κωδικού πρόσβασης</label> - <input type="password" class="form-control form-control-sm" name="password2" required> - </div> - <br /> - <button type="submit" class="btn btn-primary btn-sm col-12">Επιβεβαίωση και Είσοδος</button> - </form> - </div> - </div> -</body> -</html> diff --git a/public/app/views/user/update_password.php b/public/app/views/user/update_password.php new file mode 100644 index 0000000..38494ad --- /dev/null +++ b/public/app/views/user/update_password.php @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title><?=SITE_TITLE?> - Αλλαγή Password</title> + + <?php // header includes + //////////////////////////////////////////////////////////////////////// + Render::view('components/header_includes'); + ?> +</head> +<body class="office central-form"> + + <div class='container'> + <div class="content max420px"> + + <div class='content-form'> + <form method="post"> + <div> + <h4> + Αλλαγή Password + <button class="btn btn-back2panel btn-sm"> + Επιστροφή + </button> + </h4> + <hr/> + + <?=$form['html']?> + + <br /> + <button type="submit" class="btn btn-primary btn-sm col-12">Ενημέρωση</button> + + </div> + </form> + </div> + + </div> + </div> + +</body> + +<script>// initialize needed global variables + var values = {}; + var empty = ''; +</script> + +<script> +$(document).ready(function() { + + // intializations from form-definition + //////////////////////////////////////////////////////////////////////////// + + <?=$form['init_js']?> + + + // set known values + //////////////////////////////////////////////////////////////////////////// + + <?=$form['values_js']?> + +}); +</script> + +<?php // handle form submition + //////////////////////////////////////////////////////////////////////////// + Render::view('js/submit/update-password'); +?> + +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> +</html> diff --git a/public/app/views/user/update_properties.php b/public/app/views/user/update_properties.php index f10e36b..7da976d 100644 --- a/public/app/views/user/update_properties.php +++ b/public/app/views/user/update_properties.php @@ -17,7 +17,12 @@ <div class='content-form'> <form method="post"> <div> - <h4>Ενημέρωση στοιχείων</h4> + <h4> + Ενημέρωση στοιχείων + <button class="btn btn-back2panel btn-sm"> + Επιστροφή + </button> + </h4> <hr/> <?=$form['html']?> diff --git a/public/app/views/admin/admin-menu.php b/public/app/views/xx--admin/admin-menu.php index 52e8522..52e8522 100644 --- a/public/app/views/admin/admin-menu.php +++ b/public/app/views/xx--admin/admin-menu.php diff --git a/public/app/views/admin/categories.php b/public/app/views/xx--admin/categories.php index 26fd5a2..26fd5a2 100644 --- a/public/app/views/admin/categories.php +++ b/public/app/views/xx--admin/categories.php diff --git a/public/app/views/admin/edit_lesson.php b/public/app/views/xx--admin/edit_lesson.php index ef875b4..ef875b4 100644 --- a/public/app/views/admin/edit_lesson.php +++ b/public/app/views/xx--admin/edit_lesson.php diff --git a/public/app/views/admin/edit_page.php b/public/app/views/xx--admin/edit_page.php index 46c47bc..46c47bc 100644 --- a/public/app/views/admin/edit_page.php +++ b/public/app/views/xx--admin/edit_page.php diff --git a/public/app/views/admin/files.php b/public/app/views/xx--admin/files.php index c6d2771..c6d2771 100644 --- a/public/app/views/admin/files.php +++ b/public/app/views/xx--admin/files.php diff --git a/public/app/views/admin/lessons.php b/public/app/views/xx--admin/lessons.php index d1cd3ae..d1cd3ae 100644 --- a/public/app/views/admin/lessons.php +++ b/public/app/views/xx--admin/lessons.php diff --git a/public/app/views/admin/pages.php b/public/app/views/xx--admin/pages.php index dd8f954..dd8f954 100644 --- a/public/app/views/admin/pages.php +++ b/public/app/views/xx--admin/pages.php diff --git a/public/app/views/admin/panel.php b/public/app/views/xx--admin/panel.php index 59b8cba..59b8cba 100644 --- a/public/app/views/admin/panel.php +++ b/public/app/views/xx--admin/panel.php diff --git a/public/app/views/admin/privileges.php b/public/app/views/xx--admin/privileges.php index 587c363..587c363 100644 --- a/public/app/views/admin/privileges.php +++ b/public/app/views/xx--admin/privileges.php diff --git a/public/app/views/admin/skeleton.php b/public/app/views/xx--admin/skeleton.php index 927bd2d..927bd2d 100644 --- a/public/app/views/admin/skeleton.php +++ b/public/app/views/xx--admin/skeleton.php |
