summaryrefslogtreecommitdiff
path: root/public/app/controllers/Office.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-29 05:24:19 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-29 05:24:19 +0300
commit0294563513b7e589d2067fd0a4a824db9aa48180 (patch)
tree15c5462bf333713edab9f3088c8bc35bb5ffc170 /public/app/controllers/Office.php
parentdfd5af8e07550b0715b157fa5c14f24e4be527fa (diff)
downloadgyraf1gov-0294563513b7e589d2067fd0a4a824db9aa48180.tar.gz
gyraf1gov-0294563513b7e589d2067fd0a4a824db9aa48180.tar.bz2
gyraf1gov-0294563513b7e589d2067fd0a4a824db9aa48180.zip
beautify user-interface
Diffstat (limited to 'public/app/controllers/Office.php')
-rw-r--r--public/app/controllers/Office.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php
index 9ff4e14..a876f6c 100644
--- a/public/app/controllers/Office.php
+++ b/public/app/controllers/Office.php
@@ -16,7 +16,6 @@ use app\extends\Cache_service;
class Office {
## -------------------------------------------------------------------------
- ##
## SERVE METHODS (selects)
##
## -------------------------------------------------------------------------
@@ -114,10 +113,8 @@ class Office {
## -------------------------------------------------------------------------
- ##
## PETITION FORMS
## secretarial support / serve forms for teachers' requests and applications
- ##
## -------------------------------------------------------------------------
@@ -256,8 +253,12 @@ class Office {
['name' => 'user_id', 'value' => $user_id] // pass user identity
]);
- // #5: render the view -------------------------------------------------
- Render::view('templates/penalty', ['form' => $form]);
+ // #5: create ticket; then render the view -----------------------------
+ $ticket = self::create_ticket(); // save ticket
+ Render::view('templates/penalty', [
+ 'form' => $form,
+ 'ticket' => $ticket
+ ]);
}
@@ -282,11 +283,11 @@ class Office {
public static function add_petition()
{
$post = Registry::get('REQUEST')->POST;
-
if (self::remove_ticket($post['ticket'])) { // check ticket + remove
- $manager = new App_manager();
+ $manager = new App_manager(); // use APP Manager
+ // to get the real author (user_id) of the petition
$new_id = Content_model::add_petition([
'user_id' => $manager->getUserToken()->getUser()->getID(),