summaryrefslogtreecommitdiff
path: root/public/app
diff options
context:
space:
mode:
authorGeo Xalkis <gx23100@gmail.com>2023-07-30 20:00:44 +0300
committerGeo Xalkis <gx23100@gmail.com>2023-07-30 20:00:44 +0300
commitc6b6f89e7cda2621fd3d0dfa0768d010fc41d437 (patch)
tree4ab442691a931b5bb8820cea248516342e216b40 /public/app
parent866ee315d09b1b8ecfda9d7bed516523fc1b82e4 (diff)
downloadgyraf1gov-c6b6f89e7cda2621fd3d0dfa0768d010fc41d437.tar.gz
gyraf1gov-c6b6f89e7cda2621fd3d0dfa0768d010fc41d437.tar.bz2
gyraf1gov-c6b6f89e7cda2621fd3d0dfa0768d010fc41d437.zip
changes on petition form (more to come)
Diffstat (limited to 'public/app')
-rw-r--r--public/app/config/setup_application.php33
-rw-r--r--public/app/controllers/Office.php3
-rw-r--r--public/app/views/js/pdf-designer/penalty.php18
-rw-r--r--public/app/views/js/submit/penalty-form.php12
-rw-r--r--public/app/views/templates/penalty.php2
5 files changed, 36 insertions, 32 deletions
diff --git a/public/app/config/setup_application.php b/public/app/config/setup_application.php
index 0cd27c5..a8a911b 100644
--- a/public/app/config/setup_application.php
+++ b/public/app/config/setup_application.php
@@ -507,16 +507,7 @@ define('PENALTY_FORM', [
],
'form' => [
[
- 'name' => 'subject',
- 'label' => 'Θέμα (χαρακτηριστικός τίτλος για αναφορά)',
- 'attributes' => ['required']
- ],
- [
- 'label' => '',
- 'type' => 'label'
- ],
- [
- 'label' => 'Πειθαρχική υπόθεση',
+ 'label' => 'Θέμα: Πειθαρχική υπόθεση',
'type' => 'label'
],
[
@@ -542,8 +533,14 @@ define('PENALTY_FORM', [
[
'name' => 'of_department',
'label' => 'του τμήματος...',
+ 'type' => 'select',
+ 'options' => [
+ 'Α1', 'Α2', 'Α3', 'Α4', 'Α5', 'Α6',
+ 'Β1', 'Β2', 'Β3', 'Β4', 'Β5', 'Β6',
+ 'Γ1', 'Γ2', 'Γ3', 'Γ4', 'Γ5', 'Γ6'
+ ],
'class' => 'col-md-4',
- 'attributes' => ['required']
+ 'attributes' => ['required', 'multiple']
],
[
'name' => 'date',
@@ -566,14 +563,14 @@ define('PENALTY_FORM', [
'Γραφείο Διευθυντή',
'Γραφείο Καθηγητών'
],
- 'attributes' => ['required']
+ 'attributes' => ['required', 'auto']
],
[
'name' => 'rapporteur',
'label' => 'εισηγητής',
'type' => 'select',
'source' => '\app\extends\Cache_service::all_users',
- 'attributes' => ['required']
+ 'attributes' => ['required', 'auto']
],
[
'name' => 'charge',
@@ -604,9 +601,11 @@ define('PENALTY_FORM', [
'label' => 'Αποφασίζει',
'type' => 'select',
'options' => [
- 'προφορική επίπληξη',
- 'ωριαία αποβολή',
- 'ημερήσια αποβολή'
+ 'προφορική παρατήρηση',
+ 'επίπληξη',
+ 'προφορική παρατήρηση με ωριαία απομάκρυνση'
+ 'αποβολή από τα μαθήματα μίας ημέρας',
+ 'αποβολή από τα μαθήματα δύο ημερών'
],
'attributes' => []
],
@@ -626,7 +625,7 @@ define('PENALTY_FORM', [
'name' => 'members',
'label' => 'Μέλη',
'type' => 'select',
- 'attributes' => ['required', 'multiple'],
+ 'attributes' => ['required', 'multiple', 'auto'],
'source' => '\app\extends\Cache_service::all_users'
]
]
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php
index 4161efc..ade0a03 100644
--- a/public/app/controllers/Office.php
+++ b/public/app/controllers/Office.php
@@ -249,7 +249,8 @@ class Office {
// #4: get Form's HTML and Javascript ----------------------------------
$form = JsonToForm::json_form($form_setup, [
- ['name' => 'user_id', 'value' => $user_id] // pass user identity
+ ['name' => 'user_id', 'value' => $user_id], // pass user identity
+ ['name' => 'subject', 'value' => ''] // subject shall be auto-created
]);
// #5: create ticket; then render the view -----------------------------
diff --git a/public/app/views/js/pdf-designer/penalty.php b/public/app/views/js/pdf-designer/penalty.php
index 1b8b5ea..f2f3029 100644
--- a/public/app/views/js/pdf-designer/penalty.php
+++ b/public/app/views/js/pdf-designer/penalty.php
@@ -48,16 +48,14 @@ function designer(data, defines) {
style: 'bigger',
text: 'ΘΕΜΑ: '
},
- 'Πειθαρχική υπόθεση '+ data.of_article,
- ' '+ data.student_names +', ',
- 'του τμήματος ' + data.of_department + '\n',
+ data.subject + '\n',
{
style: 'bigger',
text: 'ΗΜΕΡΑ: '
},
elDate,
- ', Ωρα'+ data.time + '\n',
+ ', Ωρα '+ data.time + '\n',
{
style: 'bigger',
@@ -125,15 +123,13 @@ function designer(data, defines) {
]
},
{
- alignment: 'center',
- style: 'bigger',
- text: 'Το Πειθαρχικό Συμβούλιο αποφασίζει'
- },
- {
alignment: 'left',
- text: data.decision
+ style: 'bigger',
+ text: [
+ 'Το Πειθαρχικό Συμβούλιο του σχολείου ΑΠΟΦΑΣΙΖΕΙ ',
+ data.decision
+ ]
},
-
{
columns: [
{
diff --git a/public/app/views/js/submit/penalty-form.php b/public/app/views/js/submit/penalty-form.php
index e3d2748..f2d57c7 100644
--- a/public/app/views/js/submit/penalty-form.php
+++ b/public/app/views/js/submit/penalty-form.php
@@ -5,12 +5,20 @@
////////////////////////////////////////////////////////////////////////
function postObject() {
+ let deps = selected_multitexts($('select[name="of_department[]"]'));
+ console.log(deps);
return { // select content data
type_id: 2, // 1 = penalty document
- subject: $('input[name=subject]').val(),
+ subject: [
+ 'Πειθαρχική υπόθεση',
+ selected_text($('select[name=of_article]')),
+ $('textarea[name=student_names]').val() + ',',
+ ((deps.length > 1) ? 'των τμημάτων' : 'του τμήματος'),
+ deps.join(', ')
+ ].join(' '),
of_article: selected_text($('select[name=of_article]')),
student_names: $('textarea[name=student_names]').val(),
- of_department: $('input[name=of_department]').val(),
+ of_department: deps.join(', '),
date: $('input[name=date]').val(),
time: $('input[name=time]').val(),
place: selected_text($('select[name=place]')),
diff --git a/public/app/views/templates/penalty.php b/public/app/views/templates/penalty.php
index a033925..88044fb 100644
--- a/public/app/views/templates/penalty.php
+++ b/public/app/views/templates/penalty.php
@@ -21,7 +21,7 @@
<div>
<h4>
- Πρακτικό Πειθαρχικής Υπόθεσης
+ Καταγραφή Ενέργειας Υποστήριξης Εύρυθμης Λειτουργίας
<button class="btn btn-back2panel btn-sm">
Επιστροφή
</button>