summaryrefslogtreecommitdiff
path: root/public/app/views/templates/application.php
blob: 48553832ddb663e63720d9cefb93f4747668f403 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title><?=SITE_TITLE?> - Αίτηση</title>

    <?php   // header includes
        ////////////////////////////////////////////////////////////////////////
        Render::view('components/header_includes');
    ?>

</head>
<body class="office central-form">

  <div class='container'>
    <div class="content max720px">

      <div class='content-form'>
          <form method="post">
              <div>

                <h4>
                    Αίτηση
                    <button class="btn btn-back2panel btn-sm">
                        Επιστροφή
                    </button>
                </h4>
                <hr />

                <?=$form['html']?>

                <br />
                <div class="row">
                    <div class="col-4">
                        <button class="btn btn-preview btn-sm col-12">
                            Προεπισκόπηση
                        </button>
                    </div>
                    <div class="col-8">
                        <button type="submit" class="btn btn-primary btn-sm col-12">
                            Καταχώριση
                        </button>
                    </div>
                </div>

              </div>
          </form>
      </div>

      <!-- attachments -->
    <?php /* exclude until beta version
      <div class="info">
        <div class="row form-group">

            <label class="control-label col-sm-12" for="media">Συνημμένα</label>

            <div class="col-sm-12 post-media">

                <!-- Button trigger modal -->
                <button type="button" class="btn btn-sm btn-success pull-right over-bar"
                    data-bs-toggle="modal" data-bs-target="#editorModal" data-action="upload_file">
                    <i class="fas fa-plus"></i> &nbsp; Προσθήκη
                </button>

                <ul id="files_list">
                </ul>

            </div>

        </div>
      </div>
      */
    ?>  
    </div>
  </div>

  <!-- MODAL for file uploads and preview  -->
  <div class="modal fade" id="editorModal" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
                <!-- content will be dynamic -->
        </div>
    </div>
  </div>

</body>

<!-- SCRIPTS 
////////////////////////////////////////////////////////////////////////////////
-->

<script>// initialize needed global variables
    var ref = {
        organization: '<?=DEFAULT_SCHOOL?>',
        applier: '<?=$applier?>',
        ticket: '<?=$ticket?>'
    };

</script>


<?php   // include select2 supplementary functions
    ////////////////////////////////////////////////////////////////////////////
    Render::view('js/select2-supplementary');   
?>


<script>// pass dynamic js prepared by form designer
    $(document).ready(function() {

        // intializations from form-definition
        ////////////////////////////////////////////////////////////////////////
        <?=$form['init_js']?>
       
    });
</script>


<?php   // handle form submition
    ////////////////////////////////////////////////////////////////////////////
    Render::view('js/submit/application-form');
?>


<?php   // load application pdf-designer
    ////////////////////////////////////////////////////////////////////////////
    Render::view('js/pdf-designer/application');
?>


<?php   // include attachments handling
    ////////////////////////////////////////////////////////////////////////////
    Render::view('js/attachments-handling');   
?>

<!--
<script>
var source = {
    first_name: 'George',
    last_name: 'Its me!',
    father_name: 'Pipis',
    message: 'Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno.',
    constants: {
        organization: 'Ministry of Nothing'
    }  
}


// pdfMake.createPdf(designer(source)).open();
// download (+title):   .download('my-doc-title.pdf');
// open in same window: .open({}, window);
// print:               .print();
</script>
-->
</html>