From b6fea434ad2888de8dbc87d25ba0444c991d42d6 Mon Sep 17 00:00:00 2001
From: Geo Halkiadakis
Date: Tue, 6 Jun 2023 18:34:51 +0300
Subject: send invitation(s) form is ready
---
public/app/config/setup_application.php | 17 +-
public/app/controllers/Office.php | 9 +-
public/app/routes/user.php | 7 +-
public/app/views/components/own_petitions.php | 2 +-
public/app/views/templates/invite.php | 133 ++++++
public/app/views/user/panel.php | 55 +--
public/app/views/xx--admin/admin-menu.php | 47 --
public/app/views/xx--admin/categories.php | 91 ----
public/app/views/xx--admin/edit_lesson.php | 159 -------
public/app/views/xx--admin/edit_page.php | 139 ------
public/app/views/xx--admin/files.php | 96 ----
public/app/views/xx--admin/lessons.php | 126 ------
public/app/views/xx--admin/pages.php | 109 -----
public/app/views/xx--admin/panel.php | 4 -
public/app/views/xx--admin/privileges.php | 93 ----
public/app/views/xx--admin/skeleton.php | 45 --
public/assets/css/admin.css | 124 ------
public/assets/css/class.css | 4 +-
public/assets/css/main.css | 9 -
public/assets/css/normalize.css | 349 ---------------
public/assets/js/admin/categories.js | 288 ------------
public/assets/js/admin/edit_lesson.js | 600 -------------------------
public/assets/js/admin/edit_page.js | 382 ----------------
public/assets/js/admin/files.js | 302 -------------
public/assets/js/admin/lessons.js | 364 ---------------
public/assets/js/admin/pages.js | 240 ----------
public/assets/js/admin/panel.js | 1 -
public/assets/js/admin/privileges.js | 291 ------------
public/assets/js/classroom.js | 27 --
public/assets/js/edit-post.js | 612 --------------------------
public/assets/js/lesson-features.js | 218 ---------
public/assets/js/manage-category.js | 287 ------------
public/assets/js/manage-posts.js | 177 --------
public/assets/js/manage-tags.js | 163 -------
34 files changed, 157 insertions(+), 5413 deletions(-)
create mode 100644 public/app/views/templates/invite.php
delete mode 100644 public/app/views/xx--admin/admin-menu.php
delete mode 100644 public/app/views/xx--admin/categories.php
delete mode 100644 public/app/views/xx--admin/edit_lesson.php
delete mode 100644 public/app/views/xx--admin/edit_page.php
delete mode 100644 public/app/views/xx--admin/files.php
delete mode 100644 public/app/views/xx--admin/lessons.php
delete mode 100644 public/app/views/xx--admin/pages.php
delete mode 100644 public/app/views/xx--admin/panel.php
delete mode 100644 public/app/views/xx--admin/privileges.php
delete mode 100644 public/app/views/xx--admin/skeleton.php
delete mode 100644 public/assets/css/admin.css
delete mode 100644 public/assets/css/main.css
delete mode 100644 public/assets/css/normalize.css
delete mode 100644 public/assets/js/admin/categories.js
delete mode 100644 public/assets/js/admin/edit_lesson.js
delete mode 100644 public/assets/js/admin/edit_page.js
delete mode 100644 public/assets/js/admin/files.js
delete mode 100644 public/assets/js/admin/lessons.js
delete mode 100644 public/assets/js/admin/pages.js
delete mode 100644 public/assets/js/admin/panel.js
delete mode 100644 public/assets/js/admin/privileges.js
delete mode 100644 public/assets/js/classroom.js
delete mode 100644 public/assets/js/edit-post.js
delete mode 100644 public/assets/js/lesson-features.js
delete mode 100644 public/assets/js/manage-category.js
delete mode 100644 public/assets/js/manage-posts.js
delete mode 100644 public/assets/js/manage-tags.js
diff --git a/public/app/config/setup_application.php b/public/app/config/setup_application.php
index 2c8b756..45c6712 100644
--- a/public/app/config/setup_application.php
+++ b/public/app/config/setup_application.php
@@ -206,9 +206,13 @@ define('GENDERED_ARTICLE',[ // gendered (grammar) articles
+## -----------------------------------------------------------------------------
+##
+## t h e f o r m s
+##
+## -----------------------------------------------------------------------------
+
-// the forms ///////////////////////////////////////////////////////////////////
-// -----------------------------------------------------------------------------
// registration/activation form (from invitation)
// ---
@@ -295,7 +299,8 @@ define('REGISTRATION_FORM', [
]);
-
+// (edit) user properties
+// ---
define('USER_PROPERTIES_FORM', [
'defaults' => [
'outer_class' => 'col-12',
@@ -365,7 +370,8 @@ define('USER_PROPERTIES_FORM', [
]);
-
+// (re-)set password
+// ---
define('SET_PASSWORD_FORM', [
'defaults' => [
'outer_class' => 'col-12',
@@ -395,6 +401,7 @@ define('SET_PASSWORD_FORM', [
]
]);
+
// Application (common request) form
// ---
define('APPLICATION_FORM', [
@@ -488,9 +495,9 @@ define('APPLICATION_FORM', [
]
]);
+
// penalty form
// ---
-
define('PENALTY_FORM', [
'defaults' => [
'outer_class' => 'col-12',
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php
index c67249a..7a542eb 100644
--- a/public/app/controllers/Office.php
+++ b/public/app/controllers/Office.php
@@ -23,7 +23,6 @@ class Office {
## PERMITION
## -------------------------------------------------------------------------
-
/** is admin or permited
*
* shortcut method for checking access authorization
@@ -52,7 +51,6 @@ class Office {
## SERVE FILE
## -------------------------------------------------------------------------
-
/** serve file by file_path
* (request is valid only for admin users)
*
@@ -116,7 +114,6 @@ class Office {
## secretarial support / serve forms for teachers' requests and applications
## -------------------------------------------------------------------------
-
/** request any (empty/new) petition form
*
* The method acts as an authorization checker and internal router
@@ -268,7 +265,6 @@ class Office {
## handle submits of forms
## -------------------------------------------------------------------------
-
/** add_petition
*
* handle an add petition request (petition form is submited)
@@ -309,7 +305,6 @@ class Office {
## LIST PETITIONS
## -------------------------------------------------------------------------
-
public static function user_petitions()
{
$manager = new App_manager(); // use APP Manager
@@ -326,7 +321,6 @@ class Office {
}
-
public static function all_petitions()
{
if (Auth::in_admin_group()) {
@@ -338,7 +332,6 @@ class Office {
}
-
public static function petition_copy($sign)
{
if (Auth::in_admin_group()) {
@@ -359,6 +352,7 @@ class Office {
+
## TICKET METHODS (create, remove)
## tickets eliminate CSRF attacks
## -------------------------------------------------------------------------
@@ -415,7 +409,6 @@ class Office {
-
## ADMIN METHODS (insert, updated etc.)
## -------------------------------------------------------------------------
diff --git a/public/app/routes/user.php b/public/app/routes/user.php
index e43eaa9..67032e6 100644
--- a/public/app/routes/user.php
+++ b/public/app/routes/user.php
@@ -187,10 +187,15 @@ if (Auth::in_admin_group()) {
Office::set_protocol();
}, 'post');
+
// invite user(s)
// --- -- -- - - -
Route::add('/admin/invite', function() {
- Render::view('admin/invite');
+ $teachers = Registry::use('database')->runQuery(
+ "SELECT id, concat(last_name, ' ', first_name) as TeacherName
+ FROM user ORDER BY TeacherName", []
+ );
+ Render::view('templates/invite', ['teachers' => $teachers]);
});
}
diff --git a/public/app/views/components/own_petitions.php b/public/app/views/components/own_petitions.php
index 41e59b4..c4f84fe 100644
--- a/public/app/views/components/own_petitions.php
+++ b/public/app/views/components/own_petitions.php
@@ -2,7 +2,7 @@
-
Διαχείριση Αιτήσεων και Δοικητικών Εγγράφων
+
Διαχείριση Αιτήσεων και Δοικητικών Εγγράφων
-
-
-
-
-
-
-
-
-
-
-
-
- $action,
- 'id' => $id
- ]);
-
- // render main content
- ////////////////////////////////////////////////////////////////////
- Render::view("admin/{$action}",[ 'id' => $id ]); ////////////////
- ?>
-
-
-
-
-
-
-
+
diff --git a/public/app/views/xx--admin/admin-menu.php b/public/app/views/xx--admin/admin-menu.php
deleted file mode 100644
index 52e8522..0000000
--- a/public/app/views/xx--admin/admin-menu.php
+++ /dev/null
@@ -1,47 +0,0 @@
- 'posts',
- * 'id' => 4
- * ])
- * -----------------------------------------------------------------------------
- */
-
-$admin_options = [
- 'panel' => 'Διαχείριση',
- 'edit_lesson' => 'Νέο Μάθημα',
- 'lessons' => 'Μαθήματα',
- 'categories' => 'Κεφάλαια',
- 'pages' => 'Σελίδες',
- 'files' => 'Αρχεία',
- 'privileges' => 'Πρόσβαση',
- 'users' => 'Χρήστες'
-];
-?>
-
-
\ No newline at end of file
diff --git a/public/app/views/xx--admin/categories.php b/public/app/views/xx--admin/categories.php
deleted file mode 100644
index 26fd5a2..0000000
--- a/public/app/views/xx--admin/categories.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
Διαχείριση Κατηγοριών
-
-
-
- Νέο Κεφάλαιο
-
-
-
-
-
-
-
-
-
-
-
-
- Κατηγορία/Κεφάλαιο
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/edit_lesson.php b/public/app/views/xx--admin/edit_lesson.php
deleted file mode 100644
index ef875b4..0000000
--- a/public/app/views/xx--admin/edit_lesson.php
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
=$action_title?>
-
-
- Προεπισκόπηση
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/edit_page.php b/public/app/views/xx--admin/edit_page.php
deleted file mode 100644
index 46c47bc..0000000
--- a/public/app/views/xx--admin/edit_page.php
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
=$action_title?>
-
-
- Προεπισκόπηση
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Επιστροφή
-
-
-
-
-
- =$action_button?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/files.php b/public/app/views/xx--admin/files.php
deleted file mode 100644
index c6d2771..0000000
--- a/public/app/views/xx--admin/files.php
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
Διαχείριση Επιπέδων Πρόσβασης
-
-
-
-
-
-
-
-
-
-
-
-
-
- α/α
- Περιγραφή
- Διαδρομή
- Media-Type
- Πρόσβαση
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/lessons.php b/public/app/views/xx--admin/lessons.php
deleted file mode 100644
index d1cd3ae..0000000
--- a/public/app/views/xx--admin/lessons.php
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
Διαχείριση Μαθημάτων
-
-
-
-
-
-
-
-
-
-
-
- α/α
- Τίτλος
- Κεφάλαιο
- Πρόσβαση
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/pages.php b/public/app/views/xx--admin/pages.php
deleted file mode 100644
index dd8f954..0000000
--- a/public/app/views/xx--admin/pages.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
Διαχείριση Μαθημάτων
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/panel.php b/public/app/views/xx--admin/panel.php
deleted file mode 100644
index 59b8cba..0000000
--- a/public/app/views/xx--admin/panel.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
Admin panel
\ No newline at end of file
diff --git a/public/app/views/xx--admin/privileges.php b/public/app/views/xx--admin/privileges.php
deleted file mode 100644
index 587c363..0000000
--- a/public/app/views/xx--admin/privileges.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
Διαχείριση Επιπέδων Πρόσβασης
-
-
-
- Νέο Επίπεδο
-
-
-
-
-
-
-
-
-
-
-
-
- Κωδικός
- Επίπεδο Πρόσβασης
- Περιλαμβάνει
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/app/views/xx--admin/skeleton.php b/public/app/views/xx--admin/skeleton.php
deleted file mode 100644
index 927bd2d..0000000
--- a/public/app/views/xx--admin/skeleton.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
Classroom - =$title?>
-
- true]
- );
- ?>
-
-
-
-
-