summaryrefslogtreecommitdiff
path: root/tests/code/eval.php
blob: 911c68a2ac31a7423c16f4b2eeba3e30a2e343f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php 

eval("\$a = [
    'defaults' => [
        'outer_class' => 'col-12',
        'inrer_class' => 'form-control',
        'type' => 'text',
        'source' => 'user'
    ],
    'form' => [
        [
            'label' => 'Πειθαρχική υπόθεση'
        ],
        [
            'name' => 'of_student',
            'label' => 'τ.. μαθητ...',
            'attributes' => ['required']
        ],
        [
            'name' => 'of_department',
            'label' => 'του τμήματος...',
            'attributes' => ['required']
        ],
        [
            'name' => 'date',
            'label' => 'Ημερομηνία',
            'type' => 'date',
            'class' => 'col-5',
            'attributes' => ['required']
        ],
        [
            'name' => 'time',
            'label' => 'Ώρα',
            'class' => 'col-4',
            'attributes' => ['required']
        ],
        [
            'name' => 'place',
            'label' => '',
            'attributes' => ['required']
        ],
        [
            'name' => 'rapporteur',
            'label' => 'εισηγητής',
            'attributes' => ['required']
        ],
        [
            'name' => 'charge',
            'label' => 'κατηγορία',
            'attributes' => ['required']
        ],
        [
            'name' => 'apology',
            'label' => 'Απολογία',  // + of_student
            'type' => 'textarea',
            'attributes' => []
        ],
        [
            'name' => 'decision_reasoning',
            'label' => 'Αιτιολογία απόφασης (πχ. Επειδή...)',
            'type' => 'textarea',
            'attributes' => ['required']
        ],
        [
            'label' => 'Το Πειθαρχικό Συμβούλιο'
        ],
        [
            'name' => 'decision',
            'label' => 'Αποφασίζει',
            'type' => 'select',
            'options' => [
                'προφορική επίπληξη',
                'ωριαία αποβολή',
                'ημερήσια αποβολή'
            ],
            'attributes' => []
        ],
        [
            'name' => 'decision_more',
            'label' => '(μη τυποποιημένo κείμενο απόφασης)',
            'attributes' => []
        ],
        [
            'name' => 'request',
            'label' => 'Αίτημα (πχ, Παρακαλώ να μου χορηγήσετε ...)',
            'type' => 'textarea',
            'attributes' => ['required']
        ],
        [
            'name' => 'president',
            'label' => 'Ημερομηνία αίτησης',
            'type' => 'date',
            'attributes' => ['required']
        ],
        [
            'name' => 'members',
            'label' => '',
            'type' => 'select',
            'attributes' => ['required', 'multiple'],
            'source' => 'teachers'
        ]
    ]
  ];
");


echo '<pre>';
// var_dump($a);
$b = json_decode(json_encode($a));
print_r($b);
echo '</pre>';