summaryrefslogtreecommitdiff
path: root/public/app/views/js/submit
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/views/js/submit
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/views/js/submit')
-rw-r--r--public/app/views/js/submit/penalty-form.php12
1 files changed, 10 insertions, 2 deletions
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]')),