diff options
Diffstat (limited to 'public/app/views')
| -rw-r--r-- | public/app/views/templates/penalty.php | 127 | ||||
| -rw-r--r-- | public/app/views/user/registration.php | 67 | ||||
| -rw-r--r-- | public/app/views/welcome.php | 211 |
3 files changed, 178 insertions, 227 deletions
diff --git a/public/app/views/templates/penalty.php b/public/app/views/templates/penalty.php new file mode 100644 index 0000000..6a8f563 --- /dev/null +++ b/public/app/views/templates/penalty.php @@ -0,0 +1,127 @@ +<!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: #f6f6f6; + 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: 800px; width: 100%; + margin: auto auto; padding: .5em; + justify-center: center; + font-size: .78em; + } + .content-form { + padding: 1.5em; + background: #eee; + border-radius: 8px; + box-shadow: 1px 5px 7px #7777; + } + .content .info { padding: 1.5em; font-size: .92em; } + .content .info p { padding: .5em; color: #444; font-size: .82em } + .form-label { margin-bottom: .25rem; } + + .select2-container--default .select2-selection--multiple { font-size: 15px; } + .select2-container--default.select2-container--focus .select2-selection--multiple { line-height: 100%; } + label { font-size: 14px; } + </style> +</head> +<body class="classroom"> + <div class='container'> + <div class="content"> + <div class="info"> + <!--<h4>1o Γυμνάσιο Ραφήνας</h4> + <p>1o Γυμνάσιο Ραφήνας: Πλατφόρμα ηλεκτρονικών αιτήσεων και δημιουργίας εγγράφων</p>--> + </div> + <div class='content-form'> + <form method="post"> + <div> + <p>1o Γυμνάσιο Ραφήνας /<br /> + Πλατφόρμα ηλεκτρονικών αιτήσεων και δημιουργίας διαδικαστικών εγγράφων</p> + + <h2>Πρόσκληση #</h2> + + <?php + $form = JsonToForm::make_a_form(PENALTY_FORM); + ?> + + <?=$form['html']?> + + <br /> + <button type="submit" class="btn btn-primary btn-sm col-12">Εγγραφή</button> + + </div> + </form> + </div> + + <div class="info"> + <p>Απαιτείται η συμπλήρωση όλων των στοιχείων προκειμένου να γίνεται γρήγορα η σύνταξη των εγγράφων. Τα στοιχεία σας δεν πρόκειται να δημοσιοποιηθούν και προστατεύονται κατά την εισαγωγή τους με κρυπτογράφιση AES. Παράλληλα η σύνδεση στο site γίνεται με χρήση πιστοποιητικού SSL (RSA 2048 bits).</p> + <p>Αν έχετε ενεργοποιήσει ήδη το λογαρισμό σας <a href="/login">μπορείτε να συνδεθείτε</a>.</p> + + </div> + </div> +</body> + +<script> + // When form is submited + // ------------------------------------------------------------------------- + + $('.content-form form').submit( event => { + event.preventDefault(); + + if ($('input[name=password]').val() != $('input[name=password2]').val()) { + alert('Τα δυο passrods δεν ταιριάζουν!'); + + } else { + + // prepare data to POST + var data = { + first_name: $('input[name=first_name]').val(), + last_name: $('input[name=last_name]').val(), + email: $('input[name=email]').val(), + registration_number: $('input[name=registration_number]').val(), + sector: $('input[name=sector]').val(), + belonging_school: $('input[name=belonging_school]').val(), + working_shcool: $('input[name=working_shcool]').val(), + position_type_id: $('input[name=position_type_id]').val(), + phone: $('input[name=phone]').val(), + password: $('input[name=password]').val() + }; + + // select action url (add or update) + var request = '/account/register'; + + // send POST request + $.post(request, data) + .done(function( data ) { + $('.classroom .content-form').html(data.message) + }); + } + + }); + + + <?=$form['init_js']?> +</script> + +</html> diff --git a/public/app/views/user/registration.php b/public/app/views/user/registration.php index 57fbb8f..9eb0ea3 100644 --- a/public/app/views/user/registration.php +++ b/public/app/views/user/registration.php @@ -13,7 +13,7 @@ html,body{ padding:0; margin:0; font-size:1.25em; - color: #037; background: #eee; + color: #037; background: #f6f6f6; line-height:1.2em; } h3 { @@ -26,60 +26,55 @@ } .container { display: flex; height: 100vh; align-items:center; } .content { position: relative; - max-width:480px; width: 100%; + max-width: 540px; width: 100%; margin: auto auto; padding: .5em; justify-center: center; - font-size: .9em; + font-size: .78em; } .content-form { padding: 1.5em; - background: #e3e3e3; + background: #eee; border-radius: 8px; box-shadow: 1px 5px 7px #7777; } .content .info { padding: 1.5em; font-size: .92em; } - .content .info p { padding: .5em; } + .content .info p { padding: .5em; color: #444; font-size: .82em } .form-label { margin-bottom: .25rem; } + label { font-size: 14px; } </style> </head> <body class="classroom"> <div class='container'> <div class="content"> <div class="info"> - <h4>Classroom: Εγγραφή</h4> + <!--<h4>1o Γυμνάσιο Ραφήνας</h4> + <p>1o Γυμνάσιο Ραφήνας: Πλατφόρμα ηλεκτρονικών αιτήσεων και δημιουργίας εγγράφων</p>--> </div> <div class='content-form'> <form method="post"> <div> - <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="surname" class="form-label">Επίθετο</label> - <input type="text" class="form-control form-control-sm" name="surname" required> - </div> - <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" rerquired> - </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> + <p>1o Γυμνάσιο Ραφήνας /<br /> + Πλατφόρμα ηλεκτρονικών αιτήσεων και δημιουργίας διαδικαστικών εγγράφων</p> + + <h2>Πρόσκληση #</h2> + + <?php + $form = JsonToForm::make_a_form(REGISTRATION_FORM); + ?> + + <?=$form['html']?> + + <br /> + <button type="submit" class="btn btn-primary btn-sm col-12">Εγγραφή</button> + </div> </form> </div> + <div class="info"> - <p>Αν έχετε ήδη λογαρισμό <a href="/login">συνδεθείτε</a>.</p> - <p>Σε κάθε περίπτωση μπορείτε να επιστρέψετε στην <a href="/">αρχική σελίδα</a>.</p> - </div> + <p>Απαιτείται η συμπλήρωση όλων των στοιχείων προκειμένου να γίνεται γρήγορα η σύνταξη των εγγράφων. Τα στοιχεία σας δεν πρόκειται να δημοσιοποιηθούν και προστατεύονται κατά την εισαγωγή τους με κρυπτογράφιση AES. Παράλληλα η σύνδεση στο site γίνεται με χρήση πιστοποιητικού SSL (RSA 2048 bits).</p> + <p>Αν έχετε ενεργοποιήσει ήδη το λογαρισμό σας <a href="/login">μπορείτε να συνδεθείτε</a>.</p> + </div> </div> </body> @@ -98,9 +93,15 @@ // prepare data to POST var data = { - name: $('input[name=name]').val(), - surname: $('input[name=surname]').val(), + first_name: $('input[name=first_name]').val(), + last_name: $('input[name=last_name]').val(), email: $('input[name=email]').val(), + registration_number: $('input[name=registration_number]').val(), + sector: $('input[name=sector]').val(), + belonging_school: $('input[name=belonging_school]').val(), + working_shcool: $('input[name=working_shcool]').val(), + position_type_id: $('input[name=position_type_id]').val(), + phone: $('input[name=phone]').val(), password: $('input[name=password]').val() }; diff --git a/public/app/views/welcome.php b/public/app/views/welcome.php index ae260c6..e97f748 100644 --- a/public/app/views/welcome.php +++ b/public/app/views/welcome.php @@ -13,208 +13,29 @@ <!-- select2 --> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> + + <style> +label { font-size:12px; } +.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { padding-left: 0; } +.form-group { margin-bottom: .667rem; } +select { height: 31px; padding-left: 8px; padding-right: 24px; } +select, input, +select option { font-size: .87rem; } + </style> </head> <body class='classroom'> - <div class="container"> + <div class="container" style="max-width: 640px;"> + <div class="row"> <?php - $formJsonText = '[ - { - "nam" : "summary", - "lab" : "My date", - "typ" : "date", - "len" : 4 - }, - { - "nam" : "material", - "lab" : "Υλικό", - "typ" : "select", - "atr" : "multiple", - "len" : 12, - "opt" : [ - { "id" : "SILV", "tag" : "Άργυλος" }, - { "id" : "COTTO", "tag" : "Βαμβάκι" }, - { "id" : "GRASS", "tag" : "Γυαλί" }, - { "id" : "STUCC", "tag" : "Γύψος (Στούκο)" }, - { "id" : "LEATH", "tag" : "Δέρμα" }, - { "id" : "IVORY", "tag" : "Ελεφαντόδοντο" }, - { "id" : "SPSTN", "tag" : "Ημιπολύτιμος Λίθος" }, - { "id" : "FIBER", "tag" : "Ίνες δέντρου" }, - { "id" : "CANE", "tag" : "Καλάμι" }, - { "id" : "HORN", "tag" : "Κέρατα Ζώων" }, - { "id" : "BRANC", "tag" : "Κλαδί δένδρου" }, - { "id" : "BONE", "tag" : "Κόκκαλο Ζώου" }, - { "id" : "CORAL", "tag" : "Κοράλι" }, - { "id" : "SHELL", "tag" : "Κοχύλι" }, - { "id" : "WOOL", "tag" : "Μαλλί" }, - { "id" : "METAL", "tag" : "Μέταλλο" }, - { "id" : "SILK", "tag" : "Μετάξι" }, - { "id" : "WOOD", "tag" : "Ξύλο" }, - { "id" : "STONE", "tag" : "Πέτρα" }, - { "id" : "PLAST", "tag" : "Πλαστικό" }, - { "id" : "CLSTN", "tag" : "Πολίτιμος Λίθος" }, - { "id" : "FEATH", "tag" : "Πούπουλα - Φτερά ζώου" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "technique", - "lab" : "Τεχνική κατασκευής", - "typ" : "select", - "len" : 6, - "opt" : [ - { "id" : "HND", "tag" : "Χειροποίητο" }, - { "id" : "MCH", "tag" : "Μηχανοποίητο" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "color", - "lab" : "Χρωματισμός", - "typ" : "select", - "atr" : "multiple", - "len" : 6, - "opt" : [ - { "id" : "SLV", "tag" : "Ασημί" }, - { "id" : "SEA", "tag" : "Γαλάζιο" }, - { "id" : "GRY", "tag" : "Γκρι" }, - { "id" : "BRW", "tag" : "Καφέ" }, - { "id" : "YEL", "tag" : "Κίτρινο" }, - { "id" : "RED", "tag" : "Κόκκινο" }, - { "id" : "CRM", "tag" : "Κρεμ" }, - { "id" : "WHI", "tag" : "Λευκό" }, - { "id" : "LOO", "tag" : "Λουλακί (Μπλε - Μωβ)" }, - { "id" : "BLK", "tag" : "Μαύρο" }, - { "id" : "BEZ", "tag" : "Μπεζ" }, - { "id" : "BLU", "tag" : "Μπλε" }, - { "id" : "VIO", "tag" : "Μωβ (Βιολετί)" }, - { "id" : "ORN", "tag" : "Πορτοκαλί" }, - { "id" : "GRN", "tag" : "Πράσινο" }, - { "id" : "PNK", "tag" : "Ροζ" }, - { "id" : "BRZ", "tag" : "Χάλκινο" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "decoration", - "lab" : "Διακόσμηση", - "typ" : "select", - "atr" : "multiple", - "len" : 6, - "opt" : [ - { "id" : "NATR", "tag" : "Με διακόσμηση" }, - { "id" : "GEOM", "tag" : "Χωρίς διακόσμηση" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "condition", - "lab" : "Κατάσταση", - "typ" : "select", - "atr" : "multiple", - "len" : 6, - "opt" : [ - { "id" : "REP", "tag" : "Επιδιορθωμένο" }, - { "id" : "NEW", "tag" : "Καινούργιο" }, - { "id" : "DMG", "tag" : "Κατεστραμμένο" }, - { "id" : "FUL", "tag" : "Πλήρες" }, - { "id" : "PRT", "tag" : "Τμήμα - Μέρος αντικειμένου" }, - { "id" : "WRN", "tag" : "Φθαρμένο" }, - { "id" : "USE", "tag" : "Χρησιμοποιημένο" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "birthplace", - "lab" : "Τόπος κατασκευής", - "typ" : "select", - "atr" : "multiple", - "len" : 12, - "opt" : [ - { "id" : "KLS", "tag" : "Καλλασσικές Κοιλάδες" }, - { "id" : "CTY", "tag" : "Αστικά Κέντρα" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "maker", - "lab" : "Κατασκευαστής", - "typ" : "select", - "atr" : "multiple", - "len" : 12, - "opt" : [ - { "id" : "PRIV", "tag" : "Ιδιώτης" }, - { "id" : "ARTI", "tag" : "Βιοτεχνία" }, - { "id" : "zzz", "tag" : "Άλλο" } - ] - }, - { - "nam" : "decade", - "lab" : "Δεκαετία", - "typ" : "select", - "len" : 6, - "opt" : [ - { "id": "190", "tag": "1900-1909" }, - { "id": "191", "tag": "1910-1919" }, - { "id": "192", "tag": "1920-1929" }, - { "id": "193", "tag": "1930-1939" }, - { "id": "194", "tag": "1940-1949" }, - { "id": "195", "tag": "1950-1959" }, - { "id": "196", "tag": "1960-1969" }, - { "id": "197", "tag": "1970-1979" }, - { "id": "198", "tag": "1980-1989" }, - { "id": "199", "tag": "1990-1999" }, - { "id": "200", "tag": "2000-2009" }, - { "id": "201", "tag": "2010-2019" }, - { "id": "202", "tag": "2020-2029" } - ] - }, - { - "nam" : "birthyear", - "lab" : "Έτος Κατασκευής", - "typ" : "integer", - "len" : 3 - }, - { - "nam" : "days2make", - "lab" : "Χρόνος κατασκευής (μέρες)", - "typ" : "integer", - "len" : 3 - }, - { - "nam" : "scope", - "lab" : "Σκοπός", - "typ" : "select", - "atr" : "multiple", - "opt" : [ - { "id" : "APO", "tag" : "Αποτροπαϊκός" }, - { "id" : "DEC", "tag" : "Διακοσμητικός" }, - { "id" : "CLB", "tag" : "Εορταστικός" }, - { "id" : "SMB", "tag" : "Συμβολικός" }, - { "id" : "RIT", "tag" : "Ιεροτελεστικός" }, - { "id" : "CER", "tag" : "Τελετουργικός" }, - { "id" : "TOU", "tag" : "Τουριστικός" }, - { "id" : "USE", "tag" : "Χρηστικός" }, - { "id" : "zzz", "tag" : "Άλλος" } - ] - }, - { - "nam" : "moreaboutStory", - "lab" : "Κατασκευαστικές Παρατηρήσεις", - "typ" : "textarea" - } - ]'; - - $formJson = json_decode($formJsonText); - - $form = JsonToForm::make_a_form($formJson); - - ?> + $form = JsonToForm::make_a_form(REGISTRATION_FORM); + ?> <?=$form['html']?> </div> + </div> @@ -453,4 +274,6 @@ $('#post-form').on('submit', function(e){ </body> -</html>
\ No newline at end of file +</html> + + |
